From: Serhiy Storchaka Date: Tue, 26 Feb 2013 08:07:36 +0000 (+0200) Subject: Issue #13555: Fix an integer overflow check. X-Git-Tag: v2.7.4rc1~73 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d36d4e0d2b203a9e9202d619112a25dca5636d64;p=thirdparty%2FPython%2Fcpython.git Issue #13555: Fix an integer overflow check. --- diff --git a/Modules/cPickle.c b/Modules/cPickle.c index e73bac1aceef..d74ec5b7bbab 100644 --- a/Modules/cPickle.c +++ b/Modules/cPickle.c @@ -595,7 +595,7 @@ readline_file(Unpicklerobject *self, char **s) return i + 1; } } - if (self->buf_size < (PY_SSIZE_T_MAX >> 1)) { + if (self->buf_size > (PY_SSIZE_T_MAX >> 1)) { PyErr_NoMemory(); return -1; }