From: Guido van Rossum Date: Mon, 8 Feb 1999 22:38:25 +0000 (+0000) Subject: Fix buglet in load_put -- the test for bad readline result tested the X-Git-Tag: v1.5.2b2~102 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d1f66dc198a003b182e846ff65b04af8cc94e3b7;p=thirdparty%2FPython%2Fcpython.git Fix buglet in load_put -- the test for bad readline result tested the wrong variable. --- diff --git a/Modules/cPickle.c b/Modules/cPickle.c index e05f99b962b5..3bf9ba112604 100644 --- a/Modules/cPickle.c +++ b/Modules/cPickle.c @@ -3087,7 +3087,7 @@ load_put(Unpicklerobject *self) { char *s; if ((l = (*self->readline_func)(self, &s)) < 0) return -1; - if (len < 2) return bad_readline(); + if (l < 2) return bad_readline(); UNLESS (len=self->stack->length) return stackUnderflow(); UNLESS (py_str = PyString_FromStringAndSize(s, l - 1)) return -1; value=self->stack->data[len-1];