1 --- xulrunner/stub/nsXULStub.cpp 2008-07-17 21:43:11.000000000 +0200
2 +++ xulrunner/stub/nsXULStub.cpp 2008-07-17 21:47:04.000000000 +0200
9 - if (!realpath(argv[0], iniPath) || stat(iniPath, &fileStat)) {
10 + testp = realpath(argv[0], iniPath);
11 + if (!(testp != NULL && stat(iniPath, &fileStat) == 0 && S_ISREG(fileStat.st_mode) && fileStat.st_mode & S_IXUSR) || (testp != NULL && stat(iniPath, &fileStat))) {
12 const char *path = getenv("PATH");
16 char *token = strtok(pathdup, ":");
18 sprintf(tmpPath, "%s/%s", token, argv[0]);
19 - if (realpath(tmpPath, iniPath) && stat(iniPath, &fileStat) == 0) {
20 + if (realpath(tmpPath, iniPath) && stat(iniPath, &fileStat) == 0 && S_ISREG(fileStat.st_mode) && fileStat.st_mode & S_IXUSR) {