]> granicus.if.org Git - python/commitdiff
- Expat: Fix DoS via XML document with malformed UTF-8 sequences
authorMatthias Klose <doko@ubuntu.com>
Fri, 22 Jan 2010 00:39:04 +0000 (00:39 +0000)
committerMatthias Klose <doko@ubuntu.com>
Fri, 22 Jan 2010 00:39:04 +0000 (00:39 +0000)
  (CVE_2009_3560).

Misc/NEWS
Modules/expat/xmlparse.c

index 7501e874aec59ae0937d4ef739951ba804f111d6..fa5df7dcfbb29d7345660b9111b2b016d3258511 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -66,6 +66,12 @@ Library
   Extension extra options may change the output without changing the .c
   file). Initial patch by Collin Winter.
 
+Extension Modules
+-----------------
+
+- Expat: Fix DoS via XML document with malformed UTF-8 sequences
+  (CVE_2009_3560).
+
 Build
 -----
 
index e04426d0cc1591e5d45be5b0f0dcb335226af500..105958b64965463f510ef0ff6c4b57478bbcffb2 100644 (file)
@@ -3682,6 +3682,9 @@ doProlog(XML_Parser parser,
         return XML_ERROR_UNCLOSED_TOKEN;
       case XML_TOK_PARTIAL_CHAR:
         return XML_ERROR_PARTIAL_CHAR;
+      case -XML_TOK_PROLOG_S:
+        tok = -tok;
+        break;
       case XML_TOK_NONE:
 #ifdef XML_DTD
         /* for internal PE NOT referenced between declarations */