bpo-33706: Fix pymain_parse_cmdline_impl() (GH-7283) · pythoncapi/cpython@58d1683 · GitHub
Skip to content

Commit 58d1683

Browse files
authored
bpo-33706: Fix pymain_parse_cmdline_impl() (pythonGH-7283)
Fix a crash in Python initialization when parsing the command line options. Fix memcpy() size parameter: previously, we read one wchar_t after the end of _PyOS_optarg. Moreover, don't copy the trailingg NUL character: we write it manually anyway. Thanks Christoph Gohlke for the bug report and the fix!
1 parent 941ec21 commit 58d1683

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

Lines changed: 2 additions & 0 deletions

Modules/main.c

Lines changed: 1 addition & 1 deletion

0 commit comments

Comments
 (0)