Browse Source

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()
pull/9921/head
Christian Heimes 9 years ago
parent
commit
45af0c83da
  1. 2
      Python/symtable.c

2
Python/symtable.c

@ -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…
Cancel
Save