components/libxml2/patches/18.CVE-2011-3102.patch
author pavel heimlich<Pavel.Heimlich@Oracle.COM>
Fri, 09 Nov 2012 03:55:37 -0800
branchs11-update
changeset 2421 b8903076d1c2
parent 868 bb69a554cd60
permissions -rw-r--r--
15806575 SUNBT7187386-12.0 deliver translatable content in separate package/publisher
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
868
bb69a554cd60 7008726 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
     1
This patch copied/pasted from this link:
bb69a554cd60 7008726 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
     2
http://git.gnome.org/browse/libxml2/patch/?id=d8e1faeaa99c7a7c07af01c1c72de352eb590a3e
bb69a554cd60 7008726 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
     3
----------------------------------------------------------------------
bb69a554cd60 7008726 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
     4
From d8e1faeaa99c7a7c07af01c1c72de352eb590a3e Mon Sep 17 00:00:00 2001
bb69a554cd60 7008726 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
     5
From: Jüri Aedla <[email protected]>
bb69a554cd60 7008726 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
     6
Date: Mon, 07 May 2012 07:06:56 +0000
bb69a554cd60 7008726 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
     7
Subject: Fix an off by one pointer access
bb69a554cd60 7008726 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
     8
bb69a554cd60 7008726 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
     9
getting out of the range of memory allocated for xpointer decoding
bb69a554cd60 7008726 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    10
---
bb69a554cd60 7008726 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    11
diff --git a/xpointer.c b/xpointer.c
bb69a554cd60 7008726 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    12
index 37afa3a..0b463dd 100644
bb69a554cd60 7008726 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    13
--- a/xpointer.c
bb69a554cd60 7008726 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    14
+++ b/xpointer.c
bb69a554cd60 7008726 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    15
@@ -1007,21 +1007,14 @@ xmlXPtrEvalXPtrPart(xmlXPathParserContextPtr ctxt, xmlChar *name) {
bb69a554cd60 7008726 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    16
 		NEXT;
bb69a554cd60 7008726 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    17
 		break;
bb69a554cd60 7008726 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    18
 	    }
bb69a554cd60 7008726 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    19
-	    *cur++ = CUR;
bb69a554cd60 7008726 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    20
 	} else if (CUR == '(') {
bb69a554cd60 7008726 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    21
 	    level++;
bb69a554cd60 7008726 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    22
-	    *cur++ = CUR;
bb69a554cd60 7008726 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    23
 	} else if (CUR == '^') {
bb69a554cd60 7008726 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    24
-	    NEXT;
bb69a554cd60 7008726 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    25
-	    if ((CUR == ')') || (CUR == '(') || (CUR == '^')) {
bb69a554cd60 7008726 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    26
-		*cur++ = CUR;
bb69a554cd60 7008726 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    27
-	    } else {
bb69a554cd60 7008726 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    28
-		*cur++ = '^';
bb69a554cd60 7008726 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    29
-		*cur++ = CUR;
bb69a554cd60 7008726 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    30
-	    }
bb69a554cd60 7008726 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    31
-	} else {
bb69a554cd60 7008726 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    32
-	    *cur++ = CUR;
bb69a554cd60 7008726 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    33
+            if ((NXT(1) == ')') || (NXT(1) == '(') || (NXT(1) == '^')) {
bb69a554cd60 7008726 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    34
+                NEXT;
bb69a554cd60 7008726 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    35
+            }
bb69a554cd60 7008726 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    36
 	}
bb69a554cd60 7008726 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    37
+        *cur++ = CUR;
bb69a554cd60 7008726 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    38
 	NEXT;
bb69a554cd60 7008726 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    39
     }
bb69a554cd60 7008726 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    40
     *cur = 0;
bb69a554cd60 7008726 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    41
--
bb69a554cd60 7008726 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff changeset
    42
cgit v0.9.0.2