File xpdf-CVE-2010-3702,3704.patch of Package xpdf

Index: xpdf-3.02/xpdf/Gfx.cc
===================================================================
--- xpdf-3.02.orig/xpdf/Gfx.cc
+++ xpdf-3.02/xpdf/Gfx.cc
@@ -444,6 +444,7 @@ Gfx::Gfx(XRef *xrefA, OutputDev *outA, i
   xref = xrefA;
   subPage = gFalse;
   printCommands = globalParams->getPrintCommands();
+  parser = NULL;
 
   // start the resource stack
   res = new GfxResources(xref, resDict, NULL);
@@ -486,6 +487,7 @@ Gfx::Gfx(XRef *xrefA, OutputDev *outA, D
   xref = xrefA;
   subPage = gTrue;
   printCommands = globalParams->getPrintCommands();
+  parser = NULL;
 
   // start the resource stack
   res = new GfxResources(xref, resDict, NULL);
Index: xpdf-3.02/fofi/FoFiType1.cc
===================================================================
--- xpdf-3.02.orig/fofi/FoFiType1.cc
+++ xpdf-3.02/fofi/FoFiType1.cc
@@ -224,7 +224,7 @@ void FoFiType1::parse() {
 		code = code * 8 + (*p2 - '0');
 	      }
 	    }
-	    if (code < 256) {
+	    if (0 <= code && code < 256) {
 	      for (p = p2; *p == ' ' || *p == '\t'; ++p) ;
 	      if (*p == '/') {
 		++p;
openSUSE Build Service is sponsored by