Commit 6decb243 authored by Christian Heimes's avatar Christian Heimes

Fix potential NULL pointer dereferencing in ast module

CID 719690
parent b6ee92bf
...@@ -535,11 +535,11 @@ init_normalization(struct compiling *c) ...@@ -535,11 +535,11 @@ init_normalization(struct compiling *c)
if (!c->c_normalize) if (!c->c_normalize)
return 0; return 0;
c->c_normalize_args = Py_BuildValue("(sN)", "NFKC", Py_None); c->c_normalize_args = Py_BuildValue("(sN)", "NFKC", Py_None);
PyTuple_SET_ITEM(c->c_normalize_args, 1, NULL);
if (!c->c_normalize_args) { if (!c->c_normalize_args) {
Py_CLEAR(c->c_normalize); Py_CLEAR(c->c_normalize);
return 0; return 0;
} }
PyTuple_SET_ITEM(c->c_normalize_args, 1, NULL);
return 1; return 1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment