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

This commit is contained in:
Paul Flo Williams 2013-04-17 06:33:39 +01:00
parent fa3e7e6fa6
commit c34741b0d9
2 changed files with 17 additions and 1 deletions

View File

@ -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 );

View File

@ -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@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@frixxon.co.uk> - 20120731b-4
- Patch for bug #902089, out-of-bounds errors while reading PDFs