diff options
author | Brett Cannon <bcannon@gmail.com> | 2009-08-13 19:27:12 (GMT) |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2009-08-13 19:27:12 (GMT) |
commit | 764465f31506601d7e3e8a56ecf576caed09bf15 (patch) | |
tree | 5819594bea0ab8f40f214a516a50b3fea6c2cf9a /Modules/expat | |
parent | c4ad0345cf7789dc432ff57ab644db230d8baf1c (diff) | |
download | cpython-764465f31506601d7e3e8a56ecf576caed09bf15.zip cpython-764465f31506601d7e3e8a56ecf576caed09bf15.tar.gz cpython-764465f31506601d7e3e8a56ecf576caed09bf15.tar.bz2 |
Expat could crash if given the wrong kind of input by never stopping its
tokenizing step.
Thanks to Ivan Krstić for the patch.
Diffstat (limited to 'Modules/expat')
-rw-r--r-- | Modules/expat/xmltok_impl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/expat/xmltok_impl.c b/Modules/expat/xmltok_impl.c index 0ee57ab..f793a6b 100644 --- a/Modules/expat/xmltok_impl.c +++ b/Modules/expat/xmltok_impl.c @@ -1741,7 +1741,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: \ |