rpms/libXfont/devel strstr-hates-null.patch,NONE,1.1
Kristian Høgsberg (krh)
fedora-extras-commits at redhat.com
Tue Jun 26 14:59:10 UTC 2007
Author: krh
Update of /cvs/pkgs/rpms/libXfont/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv18798
Added Files:
strstr-hates-null.patch
Log Message:
* Tue Jun 26 2007 Kristian Høgsberg <krh at redhat.com> - 1.2.9-2
- Put in stop-gap patch to fix comparing links with no attributes.
strstr-hates-null.patch:
--- NEW FILE strstr-hates-null.patch ---
diff --git a/autogen.sh b/autogen.sh
diff --git a/configure.ac b/configure.ac
diff --git a/src/dummy.c b/src/dummy.c
diff --git a/src/fontfile/catalogue.c b/src/fontfile/catalogue.c
index 6d364a5..812b050 100644
--- a/src/fontfile/catalogue.c
+++ b/src/fontfile/catalogue.c
@@ -81,8 +81,13 @@ ComparePriority(const void *p1, const void *p2)
{
FontDirectoryPtr dir1 = (*(FontPathElementPtr*) p1)->private;
FontDirectoryPtr dir2 = (*(FontPathElementPtr*) p2)->private;
- const char *pri1 = strstr(dir1->attributes, PriorityAttribute);
- const char *pri2 = strstr(dir2->attributes, PriorityAttribute);
+ const char *pri1 = NULL;
+ const char *pri2 = NULL;
+
+ if (dir1->attributes != NULL)
+ pri1 = strstr(dir1->attributes, PriorityAttribute);
+ if (dir2->attributes != NULL)
+ pri2 = strstr(dir2->attributes, PriorityAttribute);
if (pri1 == NULL && pri2 == NULL)
return 0;
More information about the scm-commits
mailing list