[poppler] poppler/splash: Splash.cc, 1.8, 1.9 SplashErrorCodes.h, 1.1.1.1, 1.2

Albert Astals Cid aacid at kemper.freedesktop.org
Wed Oct 11 16:09:26 PDT 2006


Update of /cvs/poppler/poppler/splash
In directory kemper:/tmp/cvs-serv12426/splash

Modified Files:
	Splash.cc SplashErrorCodes.h 
Log Message:
       * 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


Index: Splash.cc
===================================================================
RCS file: /cvs/poppler/poppler/splash/Splash.cc,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- Splash.cc	31 May 2006 20:14:04 -0000	1.8
+++ Splash.cc	11 Oct 2006 23:09:24 -0000	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;

Index: SplashErrorCodes.h
===================================================================
RCS file: /cvs/poppler/poppler/splash/SplashErrorCodes.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- SplashErrorCodes.h	3 Mar 2005 19:45:59 -0000	1.1.1.1
+++ SplashErrorCodes.h	11 Oct 2006 23:09:24 -0000	1.2
@@ -27,4 +27,6 @@
 
 #define splashErrSingularMatrix  8	// matrix is singular
 
+#define splashErrZeroImage       9      // image of 0x0
+
 #endif



More information about the poppler mailing list