From kwaclaw at users.sourceforge.net Wed Jun 11 16:44:05 2008 From: kwaclaw at users.sourceforge.net (Karl Waclawek) Date: Wed, 11 Jun 2008 07:44:05 -0700 Subject: [Expat-checkins] expat/lib xmltok_impl.c,1.13,1.14 Message-ID: <20080611155537.C8BD91E4005@bag.python.org> Update of /cvsroot/expat/expat/lib In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv3569 Modified Files: xmltok_impl.c Log Message: Fix for bug #1990430. Index: xmltok_impl.c =================================================================== RCS file: /cvsroot/expat/expat/lib/xmltok_impl.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- xmltok_impl.c 26 Nov 2006 17:34:46 -0000 1.13 +++ xmltok_impl.c 11 Jun 2008 14:43:57 -0000 1.14 @@ -1748,6 +1748,8 @@ 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) From kwaclaw at users.sourceforge.net Fri Jun 13 15:18:47 2008 From: kwaclaw at users.sourceforge.net (Karl Waclawek) Date: Fri, 13 Jun 2008 06:18:47 -0700 Subject: [Expat-checkins] expat/lib xmltok_impl.c,1.14,1.15 Message-ID: <20080613131858.76C301E400C@bag.python.org> Update of /cvsroot/expat/expat/lib In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv4685/lib Modified Files: xmltok_impl.c Log Message: Better fix for bug #1990430. Index: xmltok_impl.c =================================================================== RCS file: /cvsroot/expat/expat/lib/xmltok_impl.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- xmltok_impl.c 11 Jun 2008 14:43:57 -0000 1.14 +++ xmltok_impl.c 13 Jun 2008 13:18:44 -0000 1.15 @@ -1744,12 +1744,10 @@ 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)