mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #23055: Fixed a buffer overflow in PyUnicode_FromFormatV. Analysis
and fix by Guido Vranken.
This commit is contained in:
parent
119479f705
commit
4dbc305002
3 changed files with 131 additions and 40 deletions
|
@ -2335,6 +2335,8 @@ parse_format_flags(const char *f,
|
|||
f--;
|
||||
}
|
||||
}
|
||||
if (width < precision)
|
||||
width = precision;
|
||||
if (*f == '\0') {
|
||||
/* bogus format "%.1" => go backward, f points to "1" */
|
||||
f--;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue