Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
ccd99752
Commit
ccd99752
authored
Aug 23, 2018
by
Alexey Izbyshev
Committed by
Victor Stinner
Aug 23, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-34436: Fix check that disables overallocation for the last fmt specifier (GH-8826)
Reported by Svace static analyzer.
parent
65bef36f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
Objects/bytesobject.c
Objects/bytesobject.c
+3
-3
No files found.
Objects/bytesobject.c
View file @
ccd99752
...
...
@@ -819,8 +819,8 @@ _PyBytes_FormatEx(const char *format, Py_ssize_t format_len,
if
(
v
==
NULL
)
goto
error
;
if
(
fmtcnt
<
0
)
{
/* last write
r
: disable writer overallocation */
if
(
fmtcnt
==
0
)
{
/* last write: disable writer overallocation */
writer
.
overallocate
=
0
;
}
...
...
@@ -1048,7 +1048,7 @@ _PyBytes_FormatEx(const char *format, Py_ssize_t format_len,
/* If overallocation was disabled, ensure that it was the last
write. Otherwise, we missed an optimization */
assert
(
writer
.
overallocate
||
fmtcnt
<
0
||
use_bytearray
);
assert
(
writer
.
overallocate
||
fmtcnt
==
0
||
use_bytearray
);
}
/* until end */
if
(
argidx
<
arglen
&&
!
dict
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment