-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
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-34436: Fix check that disables overallocation for the last fmt sp… #8826
Conversation
…ecifier Reported by Svace static analyzer.
Objects/bytesobject.c
Outdated
@@ -819,7 +819,7 @@ _PyBytes_FormatEx(const char *format, Py_ssize_t format_len, | |||
if (v == NULL) | |||
goto error; | |||
|
|||
if (fmtcnt < 0) { | |||
if (fmtcnt == 0) { | |||
/* last writer: disable writer overallocation */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a typo in the original code: it should be "last write". Would you mind to fix it as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem.
…ecifier (pythonGH-8826) Reported by Svace static analyzer. (cherry picked from commit ccd9975) Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
GH-8865 is a backport of this pull request to the 3.7 branch. |
GH-8866 is a backport of this pull request to the 3.6 branch. |
…ecifier (pythonGH-8826) Reported by Svace static analyzer. (cherry picked from commit ccd9975) Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
…ecifier
Reported by Svace static analyzer.
https://bugs.python.org/issue34436