Skip to content

bpo-35552: Fix reading past the end in PyUnicode_FromFormat() and PyBytes_FromFormat().#11276

Merged
serhiy-storchaka merged 1 commit into
python:masterfrom
serhiy-storchaka:capi-fromformat-limited-str
Jan 12, 2019
Merged

bpo-35552: Fix reading past the end in PyUnicode_FromFormat() and PyBytes_FromFormat().#11276
serhiy-storchaka merged 1 commit into
python:masterfrom
serhiy-storchaka:capi-fromformat-limited-str

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Dec 21, 2018

Copy link
Copy Markdown
Member

Format characters "%s" and "%V" in PyUnicode_FromFormat() and "%s" in PyBytes_FromFormat()
no longer read memory past the limit if precision is specified.

https://bugs.python.org/issue35552

…ytes_FromFormat().

Format characters "%s" and "%V" in PyUnicode_FromFormat() and "%s" in PyBytes_FromFormat()
no longer read memory past the limit if precision is specified.
@serhiy-storchaka
serhiy-storchaka force-pushed the capi-fromformat-limited-str branch from 3e4865e to c64bec8 Compare January 12, 2019 08:08
@serhiy-storchaka
serhiy-storchaka merged commit d586ccb into python:master Jan 12, 2019
@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 2.7, 3.7.
🐍🍒⛏🤖

@serhiy-storchaka
serhiy-storchaka deleted the capi-fromformat-limited-str branch January 12, 2019 08:30
@bedevere-bot

Copy link
Copy Markdown

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

@miss-islington

Copy link
Copy Markdown
Contributor

Sorry, @serhiy-storchaka, I could not cleanly backport this to 2.7 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker d586ccb04f79863c819b212ec5b9d873964078e4 2.7

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 12, 2019
…ytes_FromFormat(). (pythonGH-11276)

Format characters "%s" and "%V" in PyUnicode_FromFormat() and "%s" in PyBytes_FromFormat()
no longer read memory past the limit if precision is specified.
(cherry picked from commit d586ccb)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Jan 12, 2019
…ythonGH-11276)

Format character "%s" in PyString_FromFormat() no longer read memory
past the limit if precision is specified.
(cherry picked from commit d586ccb)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-bot

Copy link
Copy Markdown

GH-11534 is a backport of this pull request to the 2.7 branch.

miss-islington added a commit that referenced this pull request Jan 12, 2019
…ytes_FromFormat(). (GH-11276)

Format characters "%s" and "%V" in PyUnicode_FromFormat() and "%s" in PyBytes_FromFormat()
no longer read memory past the limit if precision is specified.
(cherry picked from commit d586ccb)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
serhiy-storchaka added a commit that referenced this pull request Jan 12, 2019
…H-11276) (GH-11534)

Format character "%s" in PyString_FromFormat() no longer read memory
past the limit if precision is specified.
(cherry picked from commit d586ccb)
@serhiy-storchaka serhiy-storchaka removed their assignment Mar 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants