mirror of
https://github.com/python/cpython.git
synced 2025-08-01 07:33:08 +00:00
Victor Stinner's patches to check the return result of PyLong_Ssize_t
reviewed by Amaury
This commit is contained in:
parent
8d77d448a5
commit
0225248033
2 changed files with 10 additions and 0 deletions
|
@ -1755,6 +1755,8 @@ s_pack_into(PyObject *self, PyObject *args)
|
|||
|
||||
/* Extract the offset from the first argument */
|
||||
offset = PyInt_AsSsize_t(PyTuple_GET_ITEM(args, 1));
|
||||
if (offset == -1 && PyErr_Occurred())
|
||||
return NULL;
|
||||
|
||||
/* Support negative offsets. */
|
||||
if (offset < 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue