--- embedaddon/expat/lib/xmltok_impl.c 2012/02/21 23:00:54 1.1.1.1 +++ embedaddon/expat/lib/xmltok_impl.c 2013/07/22 01:14:39 1.1.1.1.2.1 @@ -1744,7 +1744,7 @@ 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: \