diff options
author | Patrick Lam <plam@MIT.EDU> | 2005-12-12 13:20:41 +0000 |
---|---|---|
committer | Patrick Lam <plam@MIT.EDU> | 2005-12-12 13:20:41 +0000 |
commit | 368104c381815aa9a0c8c878f1d2be0cc5330f10 (patch) | |
tree | e45409e4663288353ffc3f2557418a3571ab5707 | |
parent | ea44e2184198aba956e39ae63a4914544c9719fe (diff) | |
download | fontconfig-368104c381815aa9a0c8c878f1d2be0cc5330f10.tar.gz |
Fix crash reported by Frederic Crozat when using libxml2.
reviewed by: plam
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | src/fcxml.c | 3 |
2 files changed, 10 insertions, 0 deletions
@@ -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)) |