Chromium Code Reviews| Index: third_party/expat/files/lib/xmltok_impl.c |
| diff --git a/third_party/expat/files/lib/xmltok_impl.c b/third_party/expat/files/lib/xmltok_impl.c |
| index 8154c1afa9237574baa086d555e524f5eba41655..d8ff5bcd806a2d8583b01f112a4022a4e9fd56ea 100644 |
| --- a/third_party/expat/files/lib/xmltok_impl.c |
| +++ b/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,12 +1744,12 @@ 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) { \ |
|
rlarocque
2013/12/17 21:35:36
It seems we added this early return statement to f
|
| - return; \ |
| + return; \ |
| } \ |
| ptr += n; \ |
| break; |