]> granicus.if.org Git - python/commit
bpo-33706: Fix pymain_parse_cmdline_impl() (GH-7283)
authorVictor Stinner <vstinner@redhat.com>
Thu, 31 May 2018 13:09:28 +0000 (15:09 +0200)
committerGitHub <noreply@github.com>
Thu, 31 May 2018 13:09:28 +0000 (15:09 +0200)
commit58d1683255abb0df4fc70960da6121aeaa41e1d1
treef2cfc80547018a700beef7b6a39d3acca9d98bbb
parent941ec210aaef517cf818b043ec28345962f78465
bpo-33706: Fix pymain_parse_cmdline_impl() (GH-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!
Misc/NEWS.d/next/Core and Builtins/2018-05-31-14-50-04.bpo-33706.ztlH04.rst [new file with mode: 0644]
Modules/main.c