Kaydet (Commit) 45af0c83 authored tarafından Christian Heimes's avatar Christian Heimes

Fix potential NULL pointer dereference in update_symbols()

symtable_analyze() calls analyze_block() with bound=NULL. Theoretically
that NULL can be passed down to update_symbols(). update_symbols() may
deference NULL and pass it to PySet_Contains()
üst bb0b0d9f
...@@ -652,7 +652,7 @@ update_symbols(PyObject *symbols, PyObject *scopes, ...@@ -652,7 +652,7 @@ update_symbols(PyObject *symbols, PyObject *scopes,
continue; continue;
} }
/* Handle global symbol */ /* Handle global symbol */
if (!PySet_Contains(bound, name)) { if (bound && !PySet_Contains(bound, name)) {
Py_DECREF(name); Py_DECREF(name);
continue; /* it's a global */ continue; /* it's a global */
} }
......
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