From 82805dab196a4fd663eace47bee4cd921c08f9af Mon Sep 17 00:00:00 2001 From: Paul Flo Williams Date: Apr 16 2013 06:03:28 +0000 Subject: Don't crash on PDFs with filters we can't understand. Fixes bug #906492 --- diff --git a/fontforge-20120731-pdf-filters.patch b/fontforge-20120731-pdf-filters.patch new file mode 100644 index 0000000..ed67875 --- /dev/null +++ b/fontforge-20120731-pdf-filters.patch @@ -0,0 +1,11 @@ +--- fontforge-20120731-b/fontforge/parsepdf.c.orig 2013-04-15 17:47:51.113706334 +0100 ++++ fontforge-20120731-b/fontforge/parsepdf.c 2013-04-15 17:55:55.531682304 +0100 +@@ -960,6 +960,8 @@ + start = 0; + num = pdf_getinteger(pt,pc); + } ++ if ( (pt=PSDictHasEntry(&pc->pdfdict,"DecodeParms"))!=NULL && strstr(pt, "/Predictor")!=NULL) ++return( NULL ); + if ( (pt=PSDictHasEntry(&pc->pdfdict,"Index"))!=NULL ) { + if ( sscanf(pt,"[%d %d]", &start, &num )!=2 ) + return( NULL ); diff --git a/fontforge.spec b/fontforge.spec index 4182850..6f10b56 100644 --- a/fontforge.spec +++ b/fontforge.spec @@ -5,7 +5,7 @@ Name: fontforge Version: 20120731b -Release: 6%{?dist} +Release: 7%{?dist} Summary: Outline and bitmap font editor Group: Applications/Publishing @@ -17,6 +17,7 @@ Patch1: fontforge-20090224-pythondl.patch Patch2: fontforge-20120731-pdf-bounds.patch # aarch64 support until it upstreams Patch3: http://ausil.fedorapeople.org/aarch64/fontforge/fontforge-aarch64.patch +Patch4: fontforge-20120731-pdf-filters.patch Requires: xdg-utils Requires: autotrace @@ -59,6 +60,7 @@ to compile applications against fontforge. %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 mkdir htdocs tar xjf %{SOURCE2} -C htdocs @@ -149,6 +151,9 @@ fi %{_libdir}/pkgconfig/*.pc %changelog +* Mon Apr 15 2013 Paul Flo Williams - 20120731b-7 +- Don't crash on PDFs with filters we can't understand. Fixes bug #906492 + * Sat Mar 23 2013 Kevin Fenzi 20120731b-6 - Add fix for aarch64 support. Fixes bug #925354