components/libxml2/patches/14.CVE-2011-3919.patch
author Petr Sumbera <petr.sumbera@oracle.com>
Mon, 16 Jul 2012 14:07:33 -0700
changeset 918 35e4a56e4a26
parent 696 b491465fd766
permissions -rw-r--r--
7184322 libxml2 should pass its internal test suite
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
696
b491465fd766 7131703 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
     1
This patch copied/pasted from this link:
b491465fd766 7131703 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
     2
http://git.gnome.org/browse/libxml2/patch/?id=5bd3c061823a8499b27422aee04ea20aae24f03e
b491465fd766 7131703 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
     3
----------------------------------------------------------------------
b491465fd766 7131703 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
     4
From 5bd3c061823a8499b27422aee04ea20aae24f03e Mon Sep 17 00:00:00 2001
b491465fd766 7131703 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
     5
From: Daniel Veillard <[email protected]>
b491465fd766 7131703 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
     6
Date: Fri, 16 Dec 2011 10:53:35 +0000
b491465fd766 7131703 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
     7
Subject: Fix an allocation error when copying entities
b491465fd766 7131703 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
     8
b491465fd766 7131703 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
     9
---
b491465fd766 7131703 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    10
diff --git a/parser.c b/parser.c
b491465fd766 7131703 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    11
index 4e5dcb9..c55e41d 100644
b491465fd766 7131703 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    12
--- a/parser.c
b491465fd766 7131703 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    13
+++ b/parser.c
b491465fd766 7131703 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    14
@@ -2709,7 +2709,7 @@ xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len,
b491465fd766 7131703 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    15
 
b491465fd766 7131703 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    16
 		buffer[nbchars++] = '&';
b491465fd766 7131703 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    17
 		if (nbchars > buffer_size - i - XML_PARSER_BUFFER_SIZE) {
b491465fd766 7131703 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    18
-		    growBuffer(buffer, XML_PARSER_BUFFER_SIZE);
b491465fd766 7131703 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    19
+		    growBuffer(buffer, i + XML_PARSER_BUFFER_SIZE);
b491465fd766 7131703 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    20
 		}
b491465fd766 7131703 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    21
 		for (;i > 0;i--)
b491465fd766 7131703 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    22
 		    buffer[nbchars++] = *cur++;
b491465fd766 7131703 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    23
--
b491465fd766 7131703 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    24
cgit v0.9.0.2
b491465fd766 7131703 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    25