-
-
Notifications
You must be signed in to change notification settings - Fork 32.9k
Closed
Labels
3.10only security fixesonly security fixes3.11only security fixesonly security fixes3.12only security fixesonly security fixesOS-windowstopic-argument-clinictype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or errortype-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump
Description
The code generated for the Py_UNICODE converter (and derived converter LPCWSTR) looks like:
const Py_UNICODE *name;
...
if (!_PyArg_ParseXXX(..., name, ...)) {
goto exit;
}
...
exit:
PyMem_Free((void *)name);
If parsing fails, PyMem_Free()
is called for uninitialized variable.
It is the only converter with non-trivial cleanup which does not have a mandatory initializer.
Metadata
Metadata
Assignees
Labels
3.10only security fixesonly security fixes3.11only security fixesonly security fixes3.12only security fixesonly security fixesOS-windowstopic-argument-clinictype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or errortype-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump
Projects
Milestone
Relationships
Development
Select code repository
Activity
serhiy-storchaka commentedon Oct 2, 2022
Seems that for now it only affects the Windows code.
I have found this bug when tried to use Argument Clinic for OS agnostic code which converts arguments to
wchar_t *
(ingetpath.c
).pythongh-97728: Argument Clinic: Fix uninitialized variable in the Py…
eryksun commentedon Oct 2, 2022
These needs to be fixed if
_winapi.CreateJunction()
is used as a fallback foros.symlink()
when creating a compatibility link such as "bin -> Scripts". More here: #97586 (comment).gh-97728: Argument Clinic: Fix uninitialized variable in the Py_UNICO…
[3.11] pythongh-97728: Argument Clinic: Fix uninitialized variable in…
[3.11] gh-97728: Argument Clinic: Fix uninitialized variable in the P…
[3.10] pythongh-97728: Argument Clinic: Fix uninitialized variable in…
[3.10] gh-97728: Argument Clinic: Fix uninitialized variable in the P…
Merge branch 'main' into dictwatch
kumaraditya303 commentedon Oct 16, 2022
Fixed by #97729