Kaydet (Commit) c58dbebf authored tarafından Martin v. Löwis's avatar Martin v. Löwis

Correctly use realloc return value. Fixes bug #114424.

üst ff1ce0f4
...@@ -503,7 +503,7 @@ _PyTuple_Resize(PyObject **pv, int newsize, int last_is_sticky) ...@@ -503,7 +503,7 @@ _PyTuple_Resize(PyObject **pv, int newsize, int last_is_sticky)
#ifdef WITH_CYCLE_GC #ifdef WITH_CYCLE_GC
PyGC_Head *g = PyObject_AS_GC((PyObject *)v); PyGC_Head *g = PyObject_AS_GC((PyObject *)v);
PyObject_GC_Fini((PyObject *)v); PyObject_GC_Fini((PyObject *)v);
sv = (PyTupleObject *) g = (PyTupleObject *)
PyObject_REALLOC((char *)g, sizeof(PyTupleObject) PyObject_REALLOC((char *)g, sizeof(PyTupleObject)
+ PyGC_HEAD_SIZE + PyGC_HEAD_SIZE
+ newsize * sizeof(PyObject *)); + newsize * sizeof(PyObject *));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment