Issue #19881: Fix bad pickling of large bytes in cpickle.

This commit is contained in:
Alexandre Vassalotti 2013-12-05 19:29:32 -08:00
parent c9a87e6bbe
commit 6e73ff1a31
3 changed files with 59 additions and 22 deletions

View file

@ -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,