From: Patrick Lam Date: Mon, 12 Dec 2005 13:20:41 +0000 (+0000) Subject: Fix crash reported by Frederic Crozat when using libxml2. X-Git-Tag: fc-2_3_93~4 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=368104c381815aa9a0c8c878f1d2be0cc5330f10;p=fontconfig.git Fix crash reported by Frederic Crozat when using libxml2. reviewed by: plam --- diff --git a/ChangeLog b/ChangeLog index de7cf22..423528b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-12-12 Behdad Esfahbod + reviewed by: plam + + * src/fcxml.c (FcConfigGetAttribute): + + Fix crash reported by Frederic Crozat when using libxml2. + 2005-12-09 Patrick Lam * 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))