Skip to content

bpo-33706: Fix pymain_parse_cmdline_impl()#7283

Merged
vstinner merged 1 commit intopython:masterfrom
vstinner:pymain_memcpy
May 31, 2018
Merged

bpo-33706: Fix pymain_parse_cmdline_impl()#7283
vstinner merged 1 commit intopython:masterfrom
vstinner:pymain_memcpy

Conversation

@vstinner
Copy link
Copy Markdown
Member

@vstinner vstinner commented May 31, 2018

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!

https://bugs.python.org/issue33706

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!
@miss-islington
Copy link
Copy Markdown
Contributor

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖

@vstinner vstinner deleted the pymain_memcpy branch May 31, 2018 13:09
@bedevere-bot
Copy link
Copy Markdown

GH-7284 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 31, 2018
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!
(cherry picked from commit 58d1683)

Co-authored-by: Victor Stinner <[email protected]>
miss-islington added a commit that referenced this pull request May 31, 2018
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!
(cherry picked from commit 58d1683)

Co-authored-by: Victor Stinner <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants