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

Conversation

Projects
None yet
4 participants
@vstinner
Copy link
Member

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

bpo-33706: Fix pymain_parse_cmdline_impl()
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!

@vstinner vstinner merged commit 58d1683 into python:master May 31, 2018

5 of 9 checks passed

VSTS: Linux-PR queued
Details
VSTS: Linux-PR-Coverage in progress
Details
VSTS: Windows-PR queued
Details
VSTS: macOS-PR queued
Details
VSTS: docs docs_20180531.50 succeeded
Details
bedevere/issue-number Issue number 33706 found
Details
bedevere/news News entry found in Misc/NEWS.d
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@miss-islington

This comment has been minimized.

Copy link

commented May 31, 2018

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

@vstinner vstinner deleted the vstinner:pymain_memcpy branch May 31, 2018

@bedevere-bot

This comment has been minimized.

Copy link

commented May 31, 2018

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

miss-islington added a commit to miss-islington/cpython that referenced this pull request May 31, 2018

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!
(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

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!
(cherry picked from commit 58d1683)

Co-authored-by: Victor Stinner <vstinner@redhat.com>

lisroach added a commit to lisroach/cpython that referenced this pull request Sep 10, 2018

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!

dacut added a commit to dacut/cpython that referenced this pull request Sep 16, 2018

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!

yahya-abou-imran added a commit to yahya-abou-imran/cpython that referenced this pull request Nov 2, 2018

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!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.