1
From: Gaurav <g.gupta@40samsung.com>
2
Date: Sat, 3 Aug 2013 22:16:02 +0800
3
Subject: Fix a possible NULL dereference
5
https://bugzilla.gnome.org/show_bug.cgi?id=705400
6
In case of allocation error the pointer was dereferenced before the
10
1 file changed, 2 insertions(+), 2 deletions(-)
12
diff --git a/SAX2.c b/SAX2.c
13
index 4adf202..33d167e 100644
16
@@ -994,12 +994,12 @@ xmlSAX2StartDocument(void *ctx)
17
#ifdef LIBXML_HTML_ENABLED
18
if (ctxt->myDoc == NULL)
19
ctxt->myDoc = htmlNewDocNoDtD(NULL, NULL);
20
- ctxt->myDoc->properties = XML_DOC_HTML;
21
- ctxt->myDoc->parseFlags = ctxt->options;
22
if (ctxt->myDoc == NULL) {
23
xmlSAX2ErrMemory(ctxt, "xmlSAX2StartDocument");
26
+ ctxt->myDoc->properties = XML_DOC_HTML;
27
+ ctxt->myDoc->parseFlags = ctxt->options;
29
xmlGenericError(xmlGenericErrorContext,
30
"libxml2 built without HTML support\n");