f4debc5
--- expat-1.95.8/lib/xmltok_impl.c.cve3720
f4debc5
+++ expat-1.95.8/lib/xmltok_impl.c
f4debc5
@@ -1741,7 +1741,7 @@ PREFIX(updatePosition)(const ENCODING *e
f4debc5
                        const char *end,
f4debc5
                        POSITION *pos)
f4debc5
 {
f4debc5
-  while (ptr != end) {
f4debc5
+  while (ptr < end) {
f4debc5
     switch (BYTE_TYPE(enc, ptr)) {
f4debc5
 #define LEAD_CASE(n) \
f4debc5
     case BT_LEAD ## n: \