diff options
Diffstat (limited to 'chromium/third_party/expat/files/lib/xmltok_impl.c')
-rw-r--r-- | chromium/third_party/expat/files/lib/xmltok_impl.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/chromium/third_party/expat/files/lib/xmltok_impl.c b/chromium/third_party/expat/files/lib/xmltok_impl.c index 8154c1afa92..9c2895b8773 100644 --- a/chromium/third_party/expat/files/lib/xmltok_impl.c +++ b/chromium/third_party/expat/files/lib/xmltok_impl.c @@ -885,7 +885,7 @@ PREFIX(scanPercent)(const ENCODING *enc, const char *ptr, const char *end, const char **nextTokPtr) { if (ptr == end) - return -XML_TOK_PERCENT; + return XML_TOK_PARTIAL; switch (BYTE_TYPE(enc, ptr)) { CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr) case BT_S: case BT_LF: case BT_CR: case BT_PERCNT: @@ -1744,13 +1744,10 @@ PREFIX(updatePosition)(const ENCODING *enc, const char *end, POSITION *pos) { - while (ptr != end) { + while (ptr < end) { switch (BYTE_TYPE(enc, ptr)) { #define LEAD_CASE(n) \ case BT_LEAD ## n: \ - if (end - ptr < n) { \ - return; \ - } \ ptr += n; \ break; LEAD_CASE(2) LEAD_CASE(3) LEAD_CASE(4) |