From ac74b169c8b5edbe183f7da954080a86b90ae224c44a11e65cb0b0aa51cba682 Mon Sep 17 00:00:00 2001 From: Petr Gajdos Date: Tue, 26 Jan 2016 08:12:16 +0000 Subject: [PATCH 1/3] - do not crash on invalid input data (when eof reached) + fontforge-eof-crash.patch OBS-URL: https://build.opensuse.org/package/show/M17N/fontforge?expand=0&rev=58 --- fontforge-eof-crash.patch | 16 ++++++++++++++++ fontforge.changes | 6 ++++++ fontforge.spec | 6 +++++- 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 fontforge-eof-crash.patch diff --git a/fontforge-eof-crash.patch b/fontforge-eof-crash.patch new file mode 100644 index 0000000..ebd405b --- /dev/null +++ b/fontforge-eof-crash.patch @@ -0,0 +1,16 @@ +Index: fontforge/parsettf.c +=================================================================== +--- fontforge/parsettf.c.orig 2016-01-26 09:01:44.025472518 +0100 ++++ fontforge/parsettf.c 2016-01-26 09:04:24.853470665 +0100 +@@ -5185,7 +5185,10 @@ + /* the index table is backwards from the way I want to use it */ + gcbig = 0; + for ( i=0; i=258 ) ++gcbig; + } + diff --git a/fontforge.changes b/fontforge.changes index 3a3ffc8..449ea0b 100644 --- a/fontforge.changes +++ b/fontforge.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jan 26 08:10:44 UTC 2016 - pgajdos@suse.com + +- do not crash on invalid input data (when eof reached) + + fontforge-eof-crash.patch + ------------------------------------------------------------------- Wed Dec 16 14:03:36 UTC 2015 - pgajdos@suse.com diff --git a/fontforge.spec b/fontforge.spec index a7ab441..e1dbbb2 100644 --- a/fontforge.spec +++ b/fontforge.spec @@ -1,7 +1,7 @@ # # spec file for package fontforge # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -32,6 +32,8 @@ Patch0: propagate-creation-and-modification-times-to-ttf.patch # workardound for bug 930076, imho upstream should fix this # https://github.com/fontforge/fontforge/issues/2270 Patch1: fontforge-version.patch +# https://github.com/fontforge/fontforge/pull/2613 +Patch2: fontforge-eof-crash.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: cairo-devel @@ -99,6 +101,7 @@ to develop applications that use FontForge libraries. %setup -q %patch0 -p1 %patch1 +%patch2 sed -i 's/\r$//' doc/html/{Big5.txt,corpchar.txt} # workaround for bug 930076; we just need the _version_of_the_release_! (see also fontforge-version.patch) --- grep 'doversion(FONTFORGE_MODTIME_STR)' fontforgeexe/startnoui.c && \ @@ -109,6 +112,7 @@ sed -i 's:FONTFORGE_MODTIME_STR:"%{version}":' fontforgeexe/startui.c %build ./bootstrap --force +CFLAGS="%{optflags} -O0" %configure \ --disable-static \ --enable-pyextension \ From e7c4187dc64b7b9fea995ecae2328032d63bec9d645f47a5540223389139ce85 Mon Sep 17 00:00:00 2001 From: Petr Gajdos Date: Tue, 26 Jan 2016 08:16:53 +0000 Subject: [PATCH 2/3] OBS-URL: https://build.opensuse.org/package/show/M17N/fontforge?expand=0&rev=59 --- fontforge.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/fontforge.spec b/fontforge.spec index e1dbbb2..3af5625 100644 --- a/fontforge.spec +++ b/fontforge.spec @@ -112,7 +112,6 @@ sed -i 's:FONTFORGE_MODTIME_STR:"%{version}":' fontforgeexe/startui.c %build ./bootstrap --force -CFLAGS="%{optflags} -O0" %configure \ --disable-static \ --enable-pyextension \ From dd8e6dedab7be2e46abc2041d9a56655aa5d8344998f83322dbe19c1ad7d839c Mon Sep 17 00:00:00 2001 From: Petr Gajdos Date: Tue, 26 Jan 2016 10:35:54 +0000 Subject: [PATCH 3/3] - do not crash on invalid input data (when eof reached) [bsc#963023] OBS-URL: https://build.opensuse.org/package/show/M17N/fontforge?expand=0&rev=60 --- fontforge.changes | 2 +- fontforge.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fontforge.changes b/fontforge.changes index 449ea0b..95e2d79 100644 --- a/fontforge.changes +++ b/fontforge.changes @@ -1,7 +1,7 @@ ------------------------------------------------------------------- Tue Jan 26 08:10:44 UTC 2016 - pgajdos@suse.com -- do not crash on invalid input data (when eof reached) +- do not crash on invalid input data (when eof reached) [bsc#963023] + fontforge-eof-crash.patch ------------------------------------------------------------------- diff --git a/fontforge.spec b/fontforge.spec index 3af5625..498e56d 100644 --- a/fontforge.spec +++ b/fontforge.spec @@ -32,7 +32,7 @@ Patch0: propagate-creation-and-modification-times-to-ttf.patch # workardound for bug 930076, imho upstream should fix this # https://github.com/fontforge/fontforge/issues/2270 Patch1: fontforge-version.patch -# https://github.com/fontforge/fontforge/pull/2613 +# https://github.com/fontforge/fontforge/pull/2613, bsc#963023 Patch2: fontforge-eof-crash.patch BuildRequires: autoconf BuildRequires: automake