]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-40679: Fix _PyEval_EvalCode() crash if qualname is NULL (GH-20615)
authorVictor Stinner <vstinner@python.org>
Thu, 4 Jun 2020 13:19:02 +0000 (15:19 +0200)
committerGitHub <noreply@github.com>
Thu, 4 Jun 2020 13:19:02 +0000 (15:19 +0200)
commit232dda6cbc10860328a83517a6e3ea238ff4147f
tree773df4853280b9bc72ef7e25f521ea90cc3129c7
parentb022e5cffbd3ff51ae361cf80f2a3b660be8b1ee
bpo-40679: Fix _PyEval_EvalCode() crash if qualname is NULL (GH-20615)

If name is NULL, name is now set to co->co_name.
If qualname is NULL, qualname is now set to name.

qualname must not be NULL: it is used to build error messages.

Cleanup also the code: declare variables where they are initialized.
Rename "name" local variables to "varname" to avoid overriding "name"
parameter.
Misc/NEWS.d/next/C API/2020-06-03-17-48-13.bpo-40679.3sgWma.rst [new file with mode: 0644]
Python/ceval.c