rpms/python-4Suite-XML/F-12 python-4Suite-XML-1.0.2-expat-dos.patch, NONE, 1.1
Miloslav Trmac
mitr at fedoraproject.org
Tue Nov 3 14:06:58 UTC 2009
Author: mitr
Update of /cvs/extras/rpms/python-4Suite-XML/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv15388
Added Files:
python-4Suite-XML-1.0.2-expat-dos.patch
Log Message:
* Tue Nov 3 2009 Miloslav Trmač <mitr at redhat.com> - 1.0.2-8
- Fix an expat DoS
Related: #531697
python-4Suite-XML-1.0.2-expat-dos.patch:
xmltok.c | 4 ++--
xmltok_impl.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
--- NEW FILE python-4Suite-XML-1.0.2-expat-dos.patch ---
diff -up 4Suite-XML-1.0.2/Ft/Xml/src/expat/lib/xmltok.c.expat-dos 4Suite-XML-1.0.2/Ft/Xml/src/expat/lib/xmltok.c
--- 4Suite-XML-1.0.2/Ft/Xml/src/expat/lib/xmltok.c.expat-dos 2006-04-28 21:54:54.000000000 +0200
+++ 4Suite-XML-1.0.2/Ft/Xml/src/expat/lib/xmltok.c 2009-11-03 14:18:03.994197360 +0100
@@ -328,13 +328,13 @@ utf8_updatePosition(const ENCODING *enc,
const char *end,
POSITION *pos)
{
- while (ptr != end) {
+ while (ptr < end) {
unsigned char ch = (unsigned char)*ptr;
if (ch >= 32) {
if (ch < 128)
ptr++;
else
- ptr += utf8_code_length[ch];
+ ptr += utf8_code_length[ch] ? utf8_code_length[ch] : 1;
pos->columnNumber++;
} else if (ch == 10) {
pos->columnNumber = 0;
diff -up 4Suite-XML-1.0.2/Ft/Xml/src/expat/lib/xmltok_impl.c.expat-dos 4Suite-XML-1.0.2/Ft/Xml/src/expat/lib/xmltok_impl.c
--- 4Suite-XML-1.0.2/Ft/Xml/src/expat/lib/xmltok_impl.c.expat-dos 2006-04-28 21:54:54.000000000 +0200
+++ 4Suite-XML-1.0.2/Ft/Xml/src/expat/lib/xmltok_impl.c 2009-11-03 14:17:55.169954596 +0100
@@ -1742,7 +1742,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: \
More information about the fedora-extras-commits
mailing list