mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
Issue #23450: Fixed possible integer overflows.
This commit is contained in:
parent
4d0d982985
commit
26861b0b29
8 changed files with 64 additions and 50 deletions
|
|
@ -673,7 +673,7 @@ _PyBytes_Format(PyObject *format, PyObject *args)
|
|||
"* wants int");
|
||||
goto error;
|
||||
}
|
||||
prec = PyLong_AsSsize_t(v);
|
||||
prec = _PyLong_AsInt(v);
|
||||
if (prec == -1 && PyErr_Occurred())
|
||||
goto error;
|
||||
if (prec < 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue