Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-33706: Fix pymain_parse_cmdline_impl() #7283

Merged
merged 1 commit into from May 31, 2018
Merged

bpo-33706: Fix pymain_parse_cmdline_impl() #7283

merged 1 commit into from May 31, 2018

Conversation

vstinner
Copy link
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
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

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 <vstinner@redhat.com>
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 <vstinner@redhat.com>
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.

None yet

4 participants