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:
parent
bb0b0d9ff0
commit
45af0c83da
|
@ -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 */
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue