diff --git a/fontconfig-crash-bdf.patch b/fontconfig-crash-bdf.patch new file mode 100644 index 0000000..7e35fd3 --- /dev/null +++ b/fontconfig-crash-bdf.patch @@ -0,0 +1,32 @@ + src/fcfreetype.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +New commits: +commit 80081555fdffea927a53fce2773cfbe9db4c51f0 +Author: Akira TAGOH +Date: Fri Jan 31 11:10:02 2014 +0900 + + Fix a crash issue when empty strings are set to the BDF properties + +Index: src/fcfreetype.c +=================================================================== +--- src/fcfreetype.c.orig 2013-10-11 05:10:18.000000000 +0200 ++++ src/fcfreetype.c 2014-01-31 08:40:43.446021821 +0100 +@@ -1586,7 +1586,7 @@ + } + if (width == -1 && + FT_Get_BDF_Property (face, "SETWIDTH_NAME", &prop) == 0 && +- prop.type == BDF_PROPERTY_TYPE_ATOM) ++ prop.type == BDF_PROPERTY_TYPE_ATOM && prop.u.atom != NULL) + { + width = FcIsWidth ((FcChar8 *) prop.u.atom); + if (FcDebug () & FC_DBG_SCANV) +@@ -1716,7 +1716,7 @@ + /* For PCF fonts, override the computed spacing with the one from + the property */ + if(FT_Get_BDF_Property(face, "SPACING", &prop) == 0 && +- prop.type == BDF_PROPERTY_TYPE_ATOM) { ++ prop.type == BDF_PROPERTY_TYPE_ATOM && prop.u.atom != NULL) { + if(!strcmp(prop.u.atom, "c") || !strcmp(prop.u.atom, "C")) + spacing = FC_CHARCELL; + else if(!strcmp(prop.u.atom, "m") || !strcmp(prop.u.atom, "M")) diff --git a/fontconfig.changes b/fontconfig.changes index 42e0894..095e4fd 100644 --- a/fontconfig.changes +++ b/fontconfig.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Jan 31 07:30:10 UTC 2014 - pgajdos@suse.com + +- fix fontconfig crash for special bdf font [bnc#860596] + * added fontconfig-crash-bdf.patch + ------------------------------------------------------------------- Fri Dec 6 13:33:14 UTC 2013 - fcrozat@suse.com diff --git a/fontconfig.spec b/fontconfig.spec index 3d7b18a..678b43e 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -1,7 +1,7 @@ # # spec file for package fontconfig # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -77,6 +77,8 @@ Patch1: usr-share-doc-packages.patch # fix submitted upstream Patch2: 0001-Fix-inversion-between-Tinos-and-Cousine-in-the-comme.patch Patch3: 0002-Add-metric-aliases-for-additional-Google-ChromeOS-fo.patch +# upstream patch http://cgit.freedesktop.org/fontconfig/commit/?id=80081555fdffea927a53fce2773cfbe9db4c51f0 +Patch4: fontconfig-crash-bdf.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build Provides: ipa-fonts-config = 003.02 Obsoletes: ipa-fonts-config <= 003.02 @@ -123,6 +125,7 @@ accepts font patterns and returns the nearest matching font. %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 %build # ----- build with automake 1.13