[LIBXML2] Update to version 2.9.10. CORE-16952

This commit is contained in:
Thomas Faber 2020-04-22 23:32:51 +02:00
parent b82bf8ce16
commit f22fa382fe
No known key found for this signature in database
GPG key ID: 076E7C3D44720826
65 changed files with 2245 additions and 2056 deletions

View file

@ -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);
}
}