summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-03-15 02:54:31 (GMT)
committerBenjamin Peterson <benjamin@python.org>2014-03-15 02:54:31 (GMT)
commitef87f8cb57e147b48665c06b41ac10b5cf4904c4 (patch)
treef8cf01a549b99a9373e400f3571a41cf7d603554 /Objects
parent45c9dceb569a7bacc27ff59cbf3964179ca3b09b (diff)
downloadcpython-ef87f8cb57e147b48665c06b41ac10b5cf4904c4.zip
cpython-ef87f8cb57e147b48665c06b41ac10b5cf4904c4.tar.gz
cpython-ef87f8cb57e147b48665c06b41ac10b5cf4904c4.tar.bz2
avoid referencing out-of-bounds memory
Diffstat (limited to 'Objects')
-rw-r--r--Objects/listobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/listobject.c b/Objects/listobject.c
index 143c7b3..5f3e282 100644
--- a/Objects/listobject.c
+++ b/Objects/listobject.c
@@ -2036,7 +2036,7 @@ fail:
if (keys != NULL) {
for (i = 0; i < saved_ob_size; i++)
Py_DECREF(keys[i]);
- if (keys != &ms.temparray[saved_ob_size+1])
+ if (saved_ob_size >= MERGESTATE_TEMP_SIZE/2)
PyMem_FREE(keys);
}