summaryrefslogtreecommitdiffstats
path: root/Modules/_pickle.c
diff options
context:
space:
mode:
authorAlexandre Vassalotti <alexandre@peadrop.com>2013-11-30 21:52:35 (GMT)
committerAlexandre Vassalotti <alexandre@peadrop.com>2013-11-30 21:52:35 (GMT)
commit896414fedf5e882345aca177d63da72bf6d8209a (patch)
tree561c2d1ce67206d64ae15ec79a28fe868efcce4f /Modules/_pickle.c
parent1a83070d9e5e6f88fb422d442ad88574db63cb93 (diff)
downloadcpython-896414fedf5e882345aca177d63da72bf6d8209a.zip
cpython-896414fedf5e882345aca177d63da72bf6d8209a.tar.gz
cpython-896414fedf5e882345aca177d63da72bf6d8209a.tar.bz2
Fixed _pickle.Unpickler to handle empty persistent IDs correctly.
Diffstat (limited to 'Modules/_pickle.c')
-rw-r--r--Modules/_pickle.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_pickle.c b/Modules/_pickle.c
index bc3b406..d862ae8 100644
--- a/Modules/_pickle.c
+++ b/Modules/_pickle.c
@@ -4665,7 +4665,7 @@ load_persid(UnpicklerObject *self)
if (self->pers_func) {
if ((len = _Unpickler_Readline(self, &s)) < 0)
return -1;
- if (len < 2)
+ if (len < 1)
return bad_readline();
pid = PyBytes_FromStringAndSize(s, len - 1);