summaryrefslogtreecommitdiff
path: root/Modules
diff options
context:
space:
mode:
authorAlexandre Vassalotti <alexandre@peadrop.com>2013-11-30 13:52:35 -0800
committerAlexandre Vassalotti <alexandre@peadrop.com>2013-11-30 13:52:35 -0800
commit896414fedf5e882345aca177d63da72bf6d8209a (patch)
tree561c2d1ce67206d64ae15ec79a28fe868efcce4f /Modules
parent1a83070d9e5e6f88fb422d442ad88574db63cb93 (diff)
downloadcpython-git-896414fedf5e882345aca177d63da72bf6d8209a.tar.gz
Fixed _pickle.Unpickler to handle empty persistent IDs correctly.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_pickle.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_pickle.c b/Modules/_pickle.c
index bc3b406f32..d862ae876c 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);