Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Disable PyBytesWriter overallocation
  • Loading branch information
vstinner committed Sep 14, 2026
commit 07d42663071791318d8d9cfc33c082a939461a77
1 change: 1 addition & 0 deletions Python/marshal.c
Original file line number Diff line number Diff line change
Expand Up @@ -2006,6 +2006,7 @@ _PyMarshal_WriteObjectToString(PyObject *x, int version, int allow_code)
if (wf.writer == NULL) {
return NULL;
}
wf.writer->overallocate = 0;
wf.ptr = wf.buf = PyBytesWriter_GetData(wf.writer);
wf.end = wf.ptr + PyBytesWriter_GetSize(wf.writer);
wf.error = WFERR_OK;
Expand Down
Loading