[Python-checkins] cpython: Fix segfault in pyexpat.c caused by 84375

christian.heimes python-checkins at python.org
Sat Jun 29 21:49:45 CEST 2013


http://hg.python.org/cpython/rev/4c7426c3ceab
changeset:   84382:4c7426c3ceab
user:        Christian Heimes <christian at cheimes.de>
date:        Sat Jun 29 21:49:27 2013 +0200
summary:
  Fix segfault in pyexpat.c caused by 84375
u can be NULL, use XDECREF

files:
  Modules/pyexpat.c |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c
--- a/Modules/pyexpat.c
+++ b/Modules/pyexpat.c
@@ -1129,7 +1129,7 @@
 
     u = PyUnicode_Decode((char*) template_buffer, 256, name, "replace");
     if (u == NULL || PyUnicode_READY(u)) {
-        Py_DECREF(u);
+        Py_XDECREF(u);
         return XML_STATUS_ERROR;
     }
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list