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

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


http://hg.python.org/cpython/rev/0ac424c86a94
changeset:   84809:0ac424c86a94
branch:      3.3
parent:      84807:adaecee37745
user:        Christian Heimes <christian at cheimes.de>
date:        Wed Jul 24 21:02:17 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
@@ -535,11 +535,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