[Python-checkins] cpython (merge 3.3 -> default): Fix potential NULL pointer dereferencing in ast module

christian.heimes python-checkins at python.org
Wed Jul 24 21:03:41 CEST 2013


http://hg.python.org/cpython/rev/96d817f41c4c
changeset:   84810:96d817f41c4c
parent:      84808:f931ee89cc1c
parent:      84809:0ac424c86a94
user:        Christian Heimes <christian at cheimes.de>
date:        Wed Jul 24 21:02:50 2013 +0200
summary:
  Fix potential NULL pointer dereferencing in ast module
CID 719690

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


diff --git a/Python/ast.c b/Python/ast.c
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -528,11 +528,11 @@
     if (!c->c_normalize)
         return 0;
     c->c_normalize_args = Py_BuildValue("(sN)", "NFKC", Py_None);
-    PyTuple_SET_ITEM(c->c_normalize_args, 1, NULL);
     if (!c->c_normalize_args) {
         Py_CLEAR(c->c_normalize);
         return 0;
     }
+    PyTuple_SET_ITEM(c->c_normalize_args, 1, NULL);
     return 1;
 }
 

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


More information about the Python-checkins mailing list