diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2012-11-24 19:42:59 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-11-24 19:42:59 (GMT) |
commit | ab56710989745ff11c10205ea993c2e423c22f75 (patch) | |
tree | 11913628f9f7fbf43d94fbdc7bc1d37ebb376c0c /Modules | |
parent | 7fde5b3ccfa93d2e0ff309af048ed86a532a0b91 (diff) | |
parent | 9982c53c2feb6e6e03c4c6d87d77c6ee69bfc435 (diff) | |
download | cpython-ab56710989745ff11c10205ea993c2e423c22f75.zip cpython-ab56710989745ff11c10205ea993c2e423c22f75.tar.gz cpython-ab56710989745ff11c10205ea993c2e423c22f75.tar.bz2 |
Issue #12848: The pure Python pickle implementation now treats object lengths as unsigned 32-bit integers, like the C implementation does.
Patch by Serhiy Storchaka.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_pickle.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_pickle.c b/Modules/_pickle.c index 5ba5599..c0b5cf5 100644 --- a/Modules/_pickle.c +++ b/Modules/_pickle.c @@ -1589,7 +1589,7 @@ save_long(PicklerObject *self, PyObject *obj) * byte at the start, and cut it back later if possible. */ nbytes = (nbits >> 3) + 1; - if (nbytes > INT_MAX) { + if (nbytes > 0x7fffffffL) { PyErr_SetString(PyExc_OverflowError, "long too large to pickle"); goto error; |