- Fixed sigsegv if there is no font seen by fontconfig (#606671), fixed by

nofont-sigsegv patch
This commit is contained in:
Jaroslav Škarvada 2010-06-25 08:22:06 +00:00
parent 3239a15597
commit c880d92980
2 changed files with 24 additions and 1 deletions

View File

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

View File

@ -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 <jskarvad@redhat.com> - 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 <jskarvad@redhat.com> - 1:8.5.8-1
- Update to 8.5.8