~ubuntu-branches/ubuntu/utopic/libxml2/utopic

« back to all changes in this revision

Viewing changes to debian/patches/0012-Fix-a-possible-NULL-dereference.patch

  • Committer: Package Import Robot
  • Author(s): Aron Xu, Christian Svensson, Daniel Schepler, Helmut Grohne, Adam Conrad, Matthias Klose, Aron Xu
  • Date: 2014-07-09 05:40:15 UTC
  • mfrom: (43.2.6 sid)
  • Revision ID: package-import@ubuntu.com-20140709054015-1q7dyagza4p2gkm0
Tags: 2.9.1+dfsg1-4
[ Christian Svensson ]
* Do not build-depend on readline (Closes: #742350)

[ Daniel Schepler ]
* Patch to bootstrap without python (Closes: #738080)

[ Helmut Grohne ]
* Drop unneeded B-D on perl and binutils (Closes: #753005)

[ Adam Conrad ]
* Actually run dh_autoreconf, which the old/new mixed rules file misses.

[ Matthias Klose ]
* Add patch to fix python multiarch issue
* Allow the package to cross-build by tweaking B-Ds on python
* Set PYTHON_LIBS for cross builds

[ Aron Xu ]
* Use correct $CC
* Configure udeb without python
* New round of cherry-picking upstream fixes
  - Includes fixes for CVE-2014-0191 (Closes: #747309).
* Call prename with -vf
* Require python-all-dev (>= 2.7.5-5~)
* Bump std-ver: 3.9.4 -> 3.9.5, no change

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From: Gaurav <g.gupta@40samsung.com>
 
2
Date: Sat, 3 Aug 2013 22:16:02 +0800
 
3
Subject: Fix a possible NULL dereference
 
4
 
 
5
https://bugzilla.gnome.org/show_bug.cgi?id=705400
 
6
In case of allocation error the pointer was dereferenced before the
 
7
test for a failure
 
8
---
 
9
 SAX2.c |    4 ++--
 
10
 1 file changed, 2 insertions(+), 2 deletions(-)
 
11
 
 
12
diff --git a/SAX2.c b/SAX2.c
 
13
index 4adf202..33d167e 100644
 
14
--- a/SAX2.c
 
15
+++ b/SAX2.c
 
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");
 
24
            return;
 
25
        }
 
26
+       ctxt->myDoc->properties = XML_DOC_HTML;
 
27
+       ctxt->myDoc->parseFlags = ctxt->options;
 
28
 #else
 
29
         xmlGenericError(xmlGenericErrorContext,
 
30
                "libxml2 built without HTML support\n");