Sophie

Sophie

distrib > Mandriva > current > i586 > media > contrib-release-src > by-pkgid > 30aefef768a8cc13818cb80f518911d0 > files > 14

xpdf-3.02-17mdv2010.1.src.rpm

--- xpdf-3.02/fofi/FoFiType1.cc.crash	2007-02-27 23:05:51.000000000 +0100
+++ xpdf-3.02/fofi/FoFiType1.cc	2009-04-13 10:25:06.000000000 +0200
@@ -235,9 +235,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;
 	  }
 	}
       }
--- xpdf-3.02/splash/Splash.cc.crash	2007-02-27 23:05:52.000000000 +0100
+++ xpdf-3.02/splash/Splash.cc	2009-04-13 10:25:06.000000000 +0200
@@ -1501,6 +1501,11 @@
     xPath->aaScale();
   }
   xPath->sort();
+  if (!&xPath->segs[0])
+  {
+    delete xPath;
+    return splashErrEmptyPath;
+  }
   scanner = new SplashXPathScanner(xPath, eo);
 
   // get the min and max x and y values