From c880d9298068d304a4b626ce76c98e6edc379421 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Fri, 25 Jun 2010 08:22:06 +0000 Subject: [PATCH] - Fixed sigsegv if there is no font seen by fontconfig (#606671), fixed by nofont-sigsegv patch --- tk-8.5.7-nofont-sigsegv.patch | 16 ++++++++++++++++ tk.spec | 9 ++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 tk-8.5.7-nofont-sigsegv.patch diff --git a/tk-8.5.7-nofont-sigsegv.patch b/tk-8.5.7-nofont-sigsegv.patch new file mode 100644 index 0000000..ab4b34a --- /dev/null +++ b/tk-8.5.7-nofont-sigsegv.patch @@ -0,0 +1,16 @@ +--- tk8.5.7/generic/tkFont.c.old 2009-03-04 00:54:11.000000000 +0100 ++++ tk8.5.7/generic/tkFont.c 2010-06-24 17:49:20.191702270 +0200 +@@ -1194,6 +1194,13 @@ Tk_AllocFontFromObj( + } + } + ++ if (fontPtr == NULL) { ++ if (isNew) { ++ Tcl_DeleteHashEntry(cacheHashPtr); ++ } ++ return NULL; ++ } ++ + fontPtr->resourceRefCount = 1; + fontPtr->objRefCount = 1; + fontPtr->cacheHashPtr = cacheHashPtr; diff --git a/tk.spec b/tk.spec index 822d587..b9034f4 100644 --- a/tk.spec +++ b/tk.spec @@ -4,7 +4,7 @@ Summary: The graphical toolkit for the Tcl scripting language Name: tk Version: %{vers} -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 1 License: TCL Group: Development/Languages @@ -27,6 +27,8 @@ Patch2: tk8.5-conf.patch Patch3: tk-seg_input.patch # RHBZ#545807, this patch is tracked in tk tracker Patch4: tk-8.5.7-color.patch +# fixes sigsegv if there is no font seen by fontconfig (#606671) +Patch5: tk-8.5.7-nofont-sigsegv.patch %description When paired with the Tcl scripting language, Tk provides a fast and powerful @@ -52,6 +54,7 @@ The package contains the development files and man pages for tk. %patch2 -p1 -b .conf %patch3 -p1 -b .seg %patch4 -p1 -b .color +%patch5 -p1 -b .nofont-sigsegv %build cd unix @@ -119,6 +122,10 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man3/* %changelog +* Fri Jun 25 2010 Jaroslav Škarvada - 1:8.5.8-2 +- Fixed sigsegv if there is no font seen by fontconfig (#606671), + fixed by nofont-sigsegv patch + * Thu Mar 18 2010 Jaroslav Škarvada - 1:8.5.8-1 - Update to 8.5.8