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()
This commit is contained in:
Christian Heimes 2016-09-09 00:22:28 +02:00
parent bb0b0d9ff0
commit 45af0c83da
1 changed files with 1 additions and 1 deletions

View File

@ -652,7 +652,7 @@ update_symbols(PyObject *symbols, PyObject *scopes,
continue;
}
/* Handle global symbol */
if (!PySet_Contains(bound, name)) {
if (bound && !PySet_Contains(bound, name)) {
Py_DECREF(name);
continue; /* it's a global */
}