[fontforge/f18] Don't crash on PDFs with filters we can't understand. Fixes bug #906492

Paul Flo Williams frixxon at fedoraproject.org
Wed Apr 17 05:33:55 UTC 2013


commit c34741b0d9fd5c7a70eb236914f2f990d5a47134
Author: Paul Flo Williams <paul at frixxon.co.uk>
Date:   Wed Apr 17 06:33:39 2013 +0100

    Don't crash on PDFs with filters we can't understand. Fixes bug #906492

 fontforge-20120731-pdf-filters.patch |   11 +++++++++++
 fontforge.spec                       |    7 ++++++-
 2 files changed, 17 insertions(+), 1 deletions(-)
---
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 0ffa719..da19491 100644
--- a/fontforge.spec
+++ b/fontforge.spec
@@ -5,7 +5,7 @@
 
 Name:           fontforge
 Version:        20120731b
-Release:        4%{?dist}
+Release:        5%{?dist}
 Summary:        Outline and bitmap font editor
 
 Group:          Applications/Publishing
@@ -15,6 +15,7 @@ Source0:        http://downloads.sourceforge.net/fontforge/fontforge_full-%{arch
 Source2:        http://downloads.sourceforge.net/fontforge/fontforge_htdocs-%{archive_version}.tar.bz2
 Patch1:         fontforge-20090224-pythondl.patch
 Patch2:         fontforge-20120731-pdf-bounds.patch
+Patch4:         fontforge-20120731-pdf-filters.patch
 
 Requires:       xdg-utils
 Requires:       autotrace
@@ -56,6 +57,7 @@ to compile applications against fontforge.
 
 %patch1 -p1
 %patch2 -p1
+%patch4 -p1
 
 mkdir htdocs
 tar xjf %{SOURCE2} -C htdocs
@@ -148,6 +150,9 @@ fi
 %{_libdir}/pkgconfig/*.pc
 
 %changelog
+* Mon Apr 15 2013 Paul Flo Williams <paul at frixxon.co.uk> - 20120731b-5
+- Don't crash on PDFs with filters we can't understand. Fixes bug #906492
+
 * Thu Feb 07 2013 Paul Flo Williams <paul at frixxon.co.uk> - 20120731b-4
 - Patch for bug #902089, out-of-bounds errors while reading PDFs
 


More information about the fonts-bugs mailing list