Potential NULL dereference of kw_defaults in has_kwonlydefaults #135302
Labels
interpreter-core
(Objects, Python, Grammar, and Parser dirs)
pending
The issue will be closed if no feedback is provided
Uh oh!
There was an error while loading. Please reload this page.
The pointer s->v.AsyncFunctionDef.args->kw_defaults is explicitly checked for NULL:
cpython/Python/symtable.c
Lines 2193 to 2195 in aaad2e8
However, a few lines later, the same pointer is passed unconditionally to the has_kwonlydefaults function:
cpython/Python/symtable.c
Lines 2203 to 2204 in aaad2e8
Inside has_kwonlydefaults, the kw_defaults parameter is not checked for NULL before being dereferenced:
cpython/Python/symtable.c
Lines 1783 to 1787 in aaad2e8
Linked PRs
The text was updated successfully, but these errors were encountered: