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

« back to all changes in this revision

Viewing changes to debian/patches/0013-Clear-up-a-potential-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
  • mto: This revision was merged to the branch mainline in revision 75.
  • Revision ID: package-import@ubuntu.com-20140709054015-rdnfjxrf3zvmw6l7
[ 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: Daniel Veillard <veillard@redhat.com>
 
2
Date: Sat, 3 Aug 2013 22:25:13 +0800
 
3
Subject: Clear up a potential NULL dereference
 
4
 
 
5
https://bugzilla.gnome.org/show_bug.cgi?id=705399
 
6
 
 
7
if ctxt->node_seq.buffer is null then ctxt->node_seq.maximum ought
 
8
to be zero but it's better to clarify the check in the code directly.
 
9
---
 
10
 parserInternals.c |    3 ++-
 
11
 1 file changed, 2 insertions(+), 1 deletion(-)
 
12
 
 
13
diff --git a/parserInternals.c b/parserInternals.c
 
14
index f8a7041..98a5836 100644
 
15
--- a/parserInternals.c
 
16
+++ b/parserInternals.c
 
17
@@ -1990,7 +1990,8 @@ xmlParserAddNodeInfo(xmlParserCtxtPtr ctxt,
 
18
 
 
19
     /* Otherwise, we need to add new node to buffer */
 
20
     else {
 
21
-        if (ctxt->node_seq.length + 1 > ctxt->node_seq.maximum) {
 
22
+        if ((ctxt->node_seq.length + 1 > ctxt->node_seq.maximum) ||
 
23
+           (ctxt->node_seq.buffer == NULL)) {
 
24
             xmlParserNodeInfo *tmp_buffer;
 
25
             unsigned int byte_size;
 
26