From a247ccd476970b9a0036379c584cb592cf08d79b Mon Sep 17 00:00:00 2001 From: Karl Waclawek Date: Fri, 13 Jun 2008 13:18:44 +0000 Subject: [PATCH] Better fix for bug #1990430. --- expat/lib/xmltok_impl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/expat/lib/xmltok_impl.c b/expat/lib/xmltok_impl.c index b71410d6..16dfb85f 100644 --- a/expat/lib/xmltok_impl.c +++ b/expat/lib/xmltok_impl.c @@ -1744,12 +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)