diff options
author | kwaclaw <kwaclaw> | 2008-06-13 13:18:44 +0000 |
---|---|---|
committer | kwaclaw <kwaclaw> | 2008-06-13 13:18:44 +0000 |
commit | 3a306751a3b7949354e7f35b4429ba2fc5e6b15d (patch) | |
tree | 1f0acf659a67c2e1b3b0c555fafd70c7b2bb23d6 | |
parent | 66c558248a323812fd802116bf429503335248c0 (diff) | |
download | libexpat-3a306751a3b7949354e7f35b4429ba2fc5e6b15d.tar.gz |
Better fix for bug #1990430.
-rw-r--r-- | lib/xmltok_impl.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/xmltok_impl.c b/lib/xmltok_impl.c index b71410d..16dfb85 100644 --- a/lib/xmltok_impl.c +++ b/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) |