From 368104c381815aa9a0c8c878f1d2be0cc5330f10 Mon Sep 17 00:00:00 2001 From: Patrick Lam Date: Mon, 12 Dec 2005 13:20:41 +0000 Subject: [PATCH] Fix crash reported by Frederic Crozat when using libxml2. reviewed by: plam --- ChangeLog | 7 +++++++ src/fcxml.c | 3 +++ 2 files changed, 10 insertions(+) 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)) -- 2.39.5