author | Stacey Marshall <Stacey.Marshall@Oracle.COM> |
Fri, 20 Jan 2012 10:02:08 +0000 | |
changeset 658 | 714803fd87a0 |
parent 624 | c33a34e65bdb |
permissions | -rw-r--r-- |
624
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
1 |
This patch taken directly from upstream: |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
2 |
http://git.gnome.org/browse/libxml2/commit/?id=1d4526f6f4ec8d18c40e2a09b387652a6c1aa2cd |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
3 |
--- libxml2-2.7.6/xpath.c Fri Dec 9 06:34:26 2011 |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
4 |
+++ libxml2-2.7.6/new.xpath.c Fri Dec 9 06:43:12 2011 |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
5 |
@@ -2485,6 +2485,7 @@ |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
6 |
sizeof(ctxt->valueTab[0])); |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
7 |
if (tmp == NULL) { |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
8 |
xmlGenericError(xmlGenericErrorContext, "realloc failed !\n"); |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
9 |
+ ctxt->error = XPATH_MEMORY_ERROR; |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
10 |
return (0); |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
11 |
} |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
12 |
ctxt->valueMax *= 2; |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
13 |
@@ -9327,6 +9328,7 @@ |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
14 |
if ( (ch & 0xc0) != 0xc0 ) { |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
15 |
xmlGenericError(xmlGenericErrorContext, |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
16 |
"xmlXPathTranslateFunction: Invalid UTF8 string\n"); |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
17 |
+ /* not asserting an XPath error is probably better */ |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
18 |
break; |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
19 |
} |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
20 |
/* then skip over remaining bytes for this char */ |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
21 |
@@ -9334,6 +9336,7 @@ |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
22 |
if ( (*cptr++ & 0xc0) != 0x80 ) { |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
23 |
xmlGenericError(xmlGenericErrorContext, |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
24 |
"xmlXPathTranslateFunction: Invalid UTF8 string\n"); |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
25 |
+ /* not asserting an XPath error is probably better */ |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
26 |
break; |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
27 |
} |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
28 |
if (ch & 0x80) /* must have had error encountered */ |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
29 |
@@ -13384,6 +13387,7 @@ |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
30 |
xmlGenericError(xmlGenericErrorContext, |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
31 |
"xmlXPathCompOpEval: variable %s bound to undefined prefix %s\n", |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
32 |
(char *) op->value4, (char *)op->value5); |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
33 |
+ ctxt->error = XPATH_UNDEF_PREFIX_ERROR; |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
34 |
return (total); |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
35 |
} |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
36 |
val = xmlXPathVariableLookupNS(ctxt->context, |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
37 |
@@ -13438,6 +13442,7 @@ |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
38 |
"xmlXPathCompOpEval: function %s bound to undefined prefix %s\n", |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
39 |
(char *)op->value4, (char *)op->value5); |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
40 |
xmlXPathPopFrame(ctxt, frame); |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
41 |
+ ctxt->error = XPATH_UNDEF_PREFIX_ERROR; |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
42 |
return (total); |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
43 |
} |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
44 |
func = xmlXPathFunctionLookupNS(ctxt->context, |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
45 |
@@ -14016,6 +14021,7 @@ |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
46 |
} |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
47 |
xmlGenericError(xmlGenericErrorContext, |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
48 |
"XPath: unknown precompiled operation %d\n", op->op); |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
49 |
+ ctxt->error = XPATH_INVALID_OPERAND; |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
50 |
return (total); |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
51 |
} |
c33a34e65bdb
7100337 Problem with library/libxml
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
diff
changeset
|
52 |