mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 04:14:10 +00:00
[LIBXML2] Update to version 2.9.10. CORE-16952
This commit is contained in:
parent
b82bf8ce16
commit
f22fa382fe
65 changed files with 2245 additions and 2056 deletions
18
sdk/lib/3rdparty/libxml2/xpointer.c
vendored
18
sdk/lib/3rdparty/libxml2/xpointer.c
vendored
|
@ -27,7 +27,7 @@
|
|||
* be parsed beforehand instead of a progressive evaluation
|
||||
* TODO: Access into entities references are not supported now ...
|
||||
* need a start to be able to pop out of entities refs since
|
||||
* parent is the endity declaration, not the ref.
|
||||
* parent is the entity declaration, not the ref.
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
|
@ -1186,7 +1186,7 @@ xmlXPtrEvalFullXPtr(xmlXPathParserContextPtr ctxt, xmlChar *name) {
|
|||
static void
|
||||
xmlXPtrEvalChildSeq(xmlXPathParserContextPtr ctxt, xmlChar *name) {
|
||||
/*
|
||||
* XPointer don't allow by syntax to address in mutirooted trees
|
||||
* XPointer don't allow by syntax to address in multirooted trees
|
||||
* this might prove useful in some cases, warn about it.
|
||||
*/
|
||||
if ((name == NULL) && (CUR == '/') && (NXT(1) != '1')) {
|
||||
|
@ -1202,13 +1202,23 @@ xmlXPtrEvalChildSeq(xmlXPathParserContextPtr ctxt, xmlChar *name) {
|
|||
}
|
||||
|
||||
while (CUR == '/') {
|
||||
int child = 0;
|
||||
int child = 0, overflow = 0;
|
||||
NEXT;
|
||||
|
||||
while ((CUR >= '0') && (CUR <= '9')) {
|
||||
child = child * 10 + (CUR - '0');
|
||||
int d = CUR - '0';
|
||||
if (child > INT_MAX / 10)
|
||||
overflow = 1;
|
||||
else
|
||||
child *= 10;
|
||||
if (child > INT_MAX - d)
|
||||
overflow = 1;
|
||||
else
|
||||
child += d;
|
||||
NEXT;
|
||||
}
|
||||
if (overflow)
|
||||
child = 0;
|
||||
xmlXPtrGetChildNo(ctxt, child);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue