I pulled these four patches from the Poppler project that apply to the iLiad Poppler but have not been applied by iRex.
I'm running them along with a highlighter enhancement. I'll be posting a patched poppler library shortly.
That fix:
* splash/Splash.cc:
* splash/SplashErrorCodes.h: Do not crash on documents that report a
0x0 mask for an image, like
http://bugs.kde.org/attachment.cgi?id=18083&action=view
* splash/Splash.cc: Initialize the values of nClipRes
* poppler/Function.cc: Initialize PostScriptFunction::codeString to
NULL so that it can safely deleted if initialization fails.
Fixes #9263.
Code:
--- SplashErrorCodes.h 2005/03/03 19:45:59 1.1
+++ SplashErrorCodes.h 2006/10/11 23:09:24 1.2
@@ -27,4 +27,6 @@
#define splashErrSingularMatrix 8 // matrix is singular
+#define splashErrZeroImage 9 // image of 0x0
+
#endif
Code:
--- Splash.cc 2006/05/31 20:14:04 1.8
+++ Splash.cc 2006/10/11 23:09:24 1.9
@@ -2515,6 +2515,8 @@
(double)mat[3], (double)mat[4], (double)mat[5]);
}
+ if (w == 0 && h == 0) return splashErrZeroImage;
+
// check for singular matrix
if (splashAbs(mat[0] * mat[3] - mat[1] * mat[2]) < 0.000001) {
return splashErrSingularMatrix;
Code:
--- Splash.cc 2006/10/11 23:09:24 1.9
+++ Splash.cc 2006/11/19 12:59:48 1.10
@@ -445,7 +445,7 @@
int x0, x1, x2, x3, y0, y1, x, y, t;
SplashCoord dx, dy, dxdy;
SplashClipResult clipRes;
- int nClipRes[3];
+ int nClipRes[3] = {0, 0, 0};
int i;
for (i = 0, seg = xPath->segs; i < xPath->length; ++i, ++seg) {
Code:
--- Function.cc 2006/05/05 20:51:01 1.5
+++ Function.cc 2006/12/10 05:24:56 1.6
@@ -978,6 +978,7 @@
GooString *tok;
code = NULL;
+ codeString = NULL;
codeSize = 0;
ok = gFalse;