summaryrefslogtreecommitdiffstats
path: root/Python/ast.c
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2013-07-24 19:02:17 (GMT)
committerChristian Heimes <christian@cheimes.de>2013-07-24 19:02:17 (GMT)
commit72f562f719ee59b79e2fa0e2efe27591c75fde26 (patch)
tree2f6d05f69e1b1d63495eb9e39fd51e9800822393 /Python/ast.c
parenta92fbe6dce55468b2dbf25008dfda8868a7e0856 (diff)
downloadcpython-72f562f719ee59b79e2fa0e2efe27591c75fde26.zip
cpython-72f562f719ee59b79e2fa0e2efe27591c75fde26.tar.gz
cpython-72f562f719ee59b79e2fa0e2efe27591c75fde26.tar.bz2
Fix potential NULL pointer dereferencing in ast module
CID 719690
Diffstat (limited to 'Python/ast.c')
-rw-r--r--Python/ast.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/ast.c b/Python/ast.c
index 1b5fa6c..9a0b064 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -535,11 +535,11 @@ init_normalization(struct compiling *c)
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;
}