Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1367)

Unified Diff: third_party/expat/files/lib/xmltok_impl.c

Issue 68713003: Update libexpat to 2.1.0 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed commit message and Security Critical = no Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/expat/files/lib/xmltok.c ('k') | third_party/expat/files/lib/xmltok_impl.c.original » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..9c2895b87739ef031ecd933df4b95e2441f8962b 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,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)
« no previous file with comments | « third_party/expat/files/lib/xmltok.c ('k') | third_party/expat/files/lib/xmltok_impl.c.original » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698