xpdf/xpdf-3.01-crash.patch

35 lines
1.0 KiB
Diff
Raw Permalink Normal View History

--- xpdf-3.00/splash/Splash.cc.tn 2005-07-25 09:59:45.000000000 +0200
+++ xpdf-3.00/splash/Splash.cc 2005-07-25 10:00:58.000000000 +0200
@@ -636,6 +641,11 @@
xPath = new SplashXPath(path, state->flatness, gTrue);
xPath->sort();
+ if (!&xPath->segs[0])
+ {
+ delete xPath;
+ return splashErrEmptyPath;
+ }
scanner = new SplashXPathScanner(xPath, eo);
// get the min and max x and y values
--- xpdf-3.00/fofi/FoFiType1.cc.tn 2005-07-25 10:34:04.000000000 +0200
+++ xpdf-3.00/fofi/FoFiType1.cc 2005-07-25 10:41:37.000000000 +0200
@@ -187,9 +187,14 @@
}
}
} else {
- if (strtok(buf, " \t") &&
- (p = strtok(NULL, " \t\n\r")) && !strcmp(p, "def")) {
- break;
+ p = strtok(buf, " \t\n\r");
+ if (p)
+ {
+ if (!strcmp(p, "def")) break;
+ if (!strcmp(p, "readonly")) break;
+ // the spec does not says this but i'm mantaining old xpdf behaviour that accepts "foo def" as end of the encoding array
+ p = strtok(buf, " \t\n\r");
+ if (p && !strcmp(p, "def")) break;
}
}
line = line1;