Contents of /trunk/xpdf/patches/xpdf-3.01-crash.patch
Parent Directory | Revision Log
Revision 153 -
(show annotations)
(download)
Tue May 8 20:52:56 2007 UTC (17 years, 4 months ago) by niro
File size: 1057 byte(s)
Tue May 8 20:52:56 2007 UTC (17 years, 4 months ago) by niro
File size: 1057 byte(s)
-import
1 | --- xpdf-3.00/splash/Splash.cc.tn 2005-07-25 09:59:45.000000000 +0200 |
2 | +++ xpdf-3.00/splash/Splash.cc 2005-07-25 10:00:58.000000000 +0200 |
3 | @@ -636,6 +641,11 @@ |
4 | |
5 | xPath = new SplashXPath(path, state->flatness, gTrue); |
6 | xPath->sort(); |
7 | + if (!&xPath->segs[0]) |
8 | + { |
9 | + delete xPath; |
10 | + return splashErrEmptyPath; |
11 | + } |
12 | scanner = new SplashXPathScanner(xPath, eo); |
13 | |
14 | // get the min and max x and y values |
15 | --- xpdf-3.00/fofi/FoFiType1.cc.tn 2005-07-25 10:34:04.000000000 +0200 |
16 | +++ xpdf-3.00/fofi/FoFiType1.cc 2005-07-25 10:41:37.000000000 +0200 |
17 | @@ -187,9 +187,14 @@ |
18 | } |
19 | } |
20 | } else { |
21 | - if (strtok(buf, " \t") && |
22 | - (p = strtok(NULL, " \t\n\r")) && !strcmp(p, "def")) { |
23 | - break; |
24 | + p = strtok(buf, " \t\n\r"); |
25 | + if (p) |
26 | + { |
27 | + if (!strcmp(p, "def")) break; |
28 | + if (!strcmp(p, "readonly")) break; |
29 | + // the spec does not says this but i'm mantaining old xpdf behaviour that accepts "foo def" as end of the encoding array |
30 | + p = strtok(buf, " \t\n\r"); |
31 | + if (p && !strcmp(p, "def")) break; |
32 | } |
33 | } |
34 | line = line1; |