/[packages]/cauldron/xulrunner/pristine/SOURCES/xulrunner-1.9.2-realpath.patch
ViewVC logotype

Contents of /cauldron/xulrunner/pristine/SOURCES/xulrunner-1.9.2-realpath.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 18114 - (show annotations) (download)
Fri Jan 14 23:22:43 2011 UTC (13 years, 3 months ago) by dmorgan
File size: 587 byte(s)
Copying release 2.0-0.b8.3mdv2011.0 to pristine/ directory.
1 --- mozilla/xulrunner/stub/nsXULStub.cpp.old 2008-04-09 09:49:41.000000000 +0300
2 +++ mozilla/xulrunner/stub/nsXULStub.cpp 2008-09-27 17:20:37.000000000 +0300
3 @@ -208,8 +208,10 @@ main(int argc, char **argv)
4 // 3) give up
5
6 struct stat fileStat;
7 + int r = readlink("/proc/self/exe", iniPath, MAXPATHLEN);
8
9 - if (!realpath(argv[0], iniPath) || stat(iniPath, &fileStat)) {
10 + if ((!(r > 0 && r < MAXPATHLEN) || stat(iniPath, &fileStat)) &&
11 + (!realpath(argv[0], iniPath) || stat(iniPath, &fileStat))) {
12 const char *path = getenv("PATH");
13 if (!path)
14 return 1;

  ViewVC Help
Powered by ViewVC 1.1.30