summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Lam <plam@MIT.EDU>2005-12-12 13:20:41 +0000
committerPatrick Lam <plam@MIT.EDU>2005-12-12 13:20:41 +0000
commit368104c381815aa9a0c8c878f1d2be0cc5330f10 (patch)
treee45409e4663288353ffc3f2557418a3571ab5707
parentea44e2184198aba956e39ae63a4914544c9719fe (diff)
downloadfontconfig-368104c381815aa9a0c8c878f1d2be0cc5330f10.tar.gz
Fix crash reported by Frederic Crozat when using libxml2.
reviewed by: plam
-rw-r--r--ChangeLog7
-rw-r--r--src/fcxml.c3
2 files changed, 10 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index de7cf22..423528b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-12-12 Behdad Esfahbod <behdad@cs.toronto.edu>
+ reviewed by: plam
+
+ * src/fcxml.c (FcConfigGetAttribute):
+
+ Fix crash reported by Frederic Crozat when using libxml2.
+
2005-12-09 Patrick Lam <plam@mit.edu>
* INSTALL:
* configure.in:
diff --git a/src/fcxml.c b/src/fcxml.c
index e718ca2..ce92f64 100644
--- a/src/fcxml.c
+++ b/src/fcxml.c
@@ -1024,6 +1024,9 @@ FcConfigGetAttribute (FcConfigParse *parse, const char *attr)
return 0;
attrs = parse->pstack->attr;
+ if (!attrs)
+ return 0;
+
while (*attrs)
{
if (!strcmp ((char *) *attrs, attr))