[libgsf] xml: fix probing crash.
- From: Morten Welinder <mortenw src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [libgsf] xml: fix probing crash.
- Date: Thu, 29 Oct 2009 14:55:25 +0000 (UTC)
commit 5000b843bd5b3269e0cb3eba80ceeda0cb07167f
Author: Morten Welinder <terra gnome org>
Date: Thu Oct 29 10:55:08 2009 -0400
xml: fix probing crash.
ChangeLog | 5 +++++
NEWS | 3 +++
gsf/gsf-libxml.c | 8 +++++---
3 files changed, 13 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index b841a62..a746139 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-10-29 Morten Welinder <terra gnome org>
+
+ * gsf/gsf-libxml.c (gsf_xml_probe_element): Fix crash on documents
+ like <a:b xmlns:c="d://"/>
+
2009-10-11 Morten Welinder <terra gnome org>
* Release 1.14.16
diff --git a/NEWS b/NEWS
index 5479805..07c773e 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,8 @@
libgsf 1.14.17
+Morten:
+ * Fix xml parser crash.
+
--------------------------------------------------------------------------
libgsf 1.14.16
diff --git a/gsf/gsf-libxml.c b/gsf/gsf-libxml.c
index 64a828f..68d6aac 100644
--- a/gsf/gsf-libxml.c
+++ b/gsf/gsf-libxml.c
@@ -448,8 +448,10 @@ gsf_xml_probe_element (GsfXMLProbeState *state,
int nb_defaulted,
const xmlChar **attributes)
{
- state->success = (state->func) (name, prefix, URI, nb_namespaces, namespaces,
- nb_attributes, nb_defaulted, attributes);
+ state->success =
+ state->func &&
+ state->func (name, prefix, URI, nb_namespaces, namespaces,
+ nb_attributes, nb_defaulted, attributes);
state->func = NULL;
}
@@ -1134,7 +1136,7 @@ gsf_xml_in_doc_set_unknown_handler (GsfXMLInDoc *doc,
* @dtor : #GsfXMLInExtDtor
* @attrs : array of xmlChar const *
*
- * Take the first node from @doc as the current node and call it's start handler.
+ * Take the first node from @doc as the current node and call its start handler.
**/
void
gsf_xml_in_push_state (GsfXMLIn *xin, GsfXMLInDoc const *doc,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]