Sophie

Sophie

distrib > Fedora > 20 > x86_64 > media > updates-src > by-pkgid > 638391c78735384ace28bcc1893e5ca4 > files > 11

xpdf-3.04-6.fc20.src.rpm

diff -up xpdf-3.04/fofi/FoFiType1.cc.crash xpdf-3.04/fofi/FoFiType1.cc
--- xpdf-3.04/fofi/FoFiType1.cc.crash	2014-05-28 14:50:50.000000000 -0400
+++ xpdf-3.04/fofi/FoFiType1.cc	2014-05-29 14:56:09.199571189 -0400
@@ -268,9 +268,14 @@ void FoFiType1::parse() {
 	    }
 	  }
 	} 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;
 	  }
 	}
       }
diff -up xpdf-3.04/splash/Splash.cc.crash xpdf-3.04/splash/Splash.cc