https://bugs.gentoo.org/show_bug.cgi?id=280615 http://svn.python.org/view?view=rev&revision=74429 --- expat/xmltok_impl.c 2005-12-16 22:57:47.000000000 +0100 +++ expat/xmltok_impl.c.oden 2009-08-21 23:55:41.000000000 +0200 @@ -1741,7 +1741,7 @@ PREFIX(updatePosition)(const ENCODING *e const char *end, POSITION *pos) { - while (ptr != end) { + while (ptr < end) { switch (BYTE_TYPE(enc, ptr)) { #define LEAD_CASE(n) \ case BT_LEAD ## n: \