]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #19513: Disable overallocation of the PyUnicodeWriter before the last write
authorVictor Stinner <victor.stinner@gmail.com>
Tue, 19 Nov 2013 11:09:00 +0000 (12:09 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Tue, 19 Nov 2013 11:09:00 +0000 (12:09 +0100)
Objects/listobject.c

index 50538e178a4efc93560ca0ec31e365c39eaa51bf..45666fddfa9653d52e6a93c08b9dc68837fefbdd 100644 (file)
@@ -387,6 +387,7 @@ list_repr(PyListObject *v)
         Py_DECREF(s);
     }
 
+    writer.overallocate = 0;
     if (_PyUnicodeWriter_WriteChar(&writer, ']') < 0)
         goto error;