gh-97728: Argument Clinic: Fix uninitialized variable in the Py_UNICODE converter (GH-97729)

It affects function os.system() on Windows and Windows-specific modules
winreg, _winapi, _overlapped, and _msi.
This commit is contained in:
Serhiy Storchaka 2022-10-03 10:42:54 +03:00 committed by GitHub
parent e738b5190b
commit 0ee9619a4c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 46 additions and 42 deletions

View file

@ -3586,6 +3586,7 @@ class Py_UNICODE_converter(CConverter):
self.converter = '_PyUnicode_WideCharString_Opt_Converter'
else:
fail("Py_UNICODE_converter: illegal 'accept' argument " + repr(accept))
self.c_default = "NULL"
def cleanup(self):
if not self.length: