mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue