components/libxml2/patches/12.CVE-2011-2834.patch
changeset 1044 ab6b15638457
parent 1043 585b09419d1c
child 1045 2dbef0a33dc7
--- a/components/libxml2/patches/12.CVE-2011-2834.patch	Tue Nov 06 16:27:21 2012 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-This patch taken directly from upstream:
-http://git.gnome.org/browse/libxml2/commit/?id=1d4526f6f4ec8d18c40e2a09b387652a6c1aa2cd
---- libxml2-2.7.6/xpath.c	Fri Dec  9 06:34:26 2011
-+++ libxml2-2.7.6/new.xpath.c	Fri Dec  9 06:43:12 2011
-@@ -2485,6 +2485,7 @@
-                                              sizeof(ctxt->valueTab[0]));
-         if (tmp == NULL) {
-             xmlGenericError(xmlGenericErrorContext, "realloc failed !\n");
-+	    ctxt->error = XPATH_MEMORY_ERROR;
-             return (0);
-         }
-         ctxt->valueMax *= 2;
-@@ -9327,6 +9328,7 @@
- 		if ( (ch & 0xc0) != 0xc0 ) {
- 		    xmlGenericError(xmlGenericErrorContext,
- 			"xmlXPathTranslateFunction: Invalid UTF8 string\n");
-+		    /* not asserting an XPath error is probably better */
- 		    break;
- 		}
- 		/* then skip over remaining bytes for this char */
-@@ -9334,6 +9336,7 @@
- 		    if ( (*cptr++ & 0xc0) != 0x80 ) {
- 			xmlGenericError(xmlGenericErrorContext,
- 			    "xmlXPathTranslateFunction: Invalid UTF8 string\n");
-+			/* not asserting an XPath error is probably better */
- 			break;
- 		    }
- 		if (ch & 0x80) /* must have had error encountered */
-@@ -13384,6 +13387,7 @@
-                         xmlGenericError(xmlGenericErrorContext,
-             "xmlXPathCompOpEval: variable %s bound to undefined prefix %s\n",
-                                     (char *) op->value4, (char *)op->value5);
-+			ctxt->error = XPATH_UNDEF_PREFIX_ERROR;
-                         return (total);
-                     }
- 		    val = xmlXPathVariableLookupNS(ctxt->context,
-@@ -13438,6 +13442,7 @@
-             "xmlXPathCompOpEval: function %s bound to undefined prefix %s\n",
-                                     (char *)op->value4, (char *)op->value5);
- 			    xmlXPathPopFrame(ctxt, frame);
-+			    ctxt->error = XPATH_UNDEF_PREFIX_ERROR;
-                             return (total);
-                         }
-                         func = xmlXPathFunctionLookupNS(ctxt->context,
-@@ -14016,6 +14021,7 @@
-     }
-     xmlGenericError(xmlGenericErrorContext,
-                     "XPath: unknown precompiled operation %d\n", op->op);
-+    ctxt->error = XPATH_INVALID_OPERAND;
-     return (total);
- }
-