diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-02-16 18:52:17 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-02-16 18:52:17 (GMT) |
commit | 26861b0b29fdf64fba8cd120183408495f2c80e2 (patch) | |
tree | 68aa9e4560327db352dcbda56bf3ea0325bde0f7 /Objects/bytesobject.c | |
parent | 4d0d9829851915e97ae392dd803976be6c95c8d1 (diff) | |
download | cpython-26861b0b29fdf64fba8cd120183408495f2c80e2.zip cpython-26861b0b29fdf64fba8cd120183408495f2c80e2.tar.gz cpython-26861b0b29fdf64fba8cd120183408495f2c80e2.tar.bz2 |
Issue #23450: Fixed possible integer overflows.
Diffstat (limited to 'Objects/bytesobject.c')
-rw-r--r-- | Objects/bytesobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c index 30b0e50..b015974 100644 --- a/Objects/bytesobject.c +++ b/Objects/bytesobject.c @@ -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) |