Issue #23450: Fixed possible integer overflows.

This commit is contained in:
Serhiy Storchaka 2015-02-16 20:52:17 +02:00
parent 4d0d982985
commit 26861b0b29
8 changed files with 64 additions and 50 deletions

View file

@ -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)