commit | 896414fedf5e882345aca177d63da72bf6d8209a | [log] [tgz] |
---|---|---|
author | Alexandre Vassalotti <alexandre@peadrop.com> | Sat Nov 30 13:52:35 2013 -0800 |
committer | Alexandre Vassalotti <alexandre@peadrop.com> | Sat Nov 30 13:52:35 2013 -0800 |
tree | 561c2d1ce67206d64ae15ec79a28fe868efcce4f | |
parent | 1a83070d9e5e6f88fb422d442ad88574db63cb93 [diff] [blame] |
Fixed _pickle.Unpickler to handle empty persistent IDs correctly.
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 @@ 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);