Skip to content

Commit 07d4266

Browse files
committed
Disable PyBytesWriter overallocation
1 parent 291ece5 commit 07d4266

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎Python/marshal.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2006,6 +2006,7 @@ _PyMarshal_WriteObjectToString(PyObject *x, int version, int allow_code)
20062006
if (wf.writer == NULL) {
20072007
return NULL;
20082008
}
2009+
wf.writer->overallocate = 0;
20092010
wf.ptr = wf.buf = PyBytesWriter_GetData(wf.writer);
20102011
wf.end = wf.ptr + PyBytesWriter_GetSize(wf.writer);
20112012
wf.error = WFERR_OK;

0 commit comments

Comments
 (0)