mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
Issue #19881: Fix bad pickling of large bytes in cpickle.
This commit is contained in:
parent
c9a87e6bbe
commit
6e73ff1a31
3 changed files with 59 additions and 22 deletions
|
|
@ -2027,7 +2027,7 @@ save_bytes(PicklerObject *self, PyObject *obj)
|
|||
else if (self->proto >= 4) {
|
||||
header[0] = BINBYTES8;
|
||||
_write_size64(header + 1, size);
|
||||
len = 8;
|
||||
len = 9;
|
||||
}
|
||||
else {
|
||||
PyErr_SetString(PyExc_OverflowError,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue