From d36d4e0d2b203a9e9202d619112a25dca5636d64 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Tue, 26 Feb 2013 10:07:36 +0200 Subject: Issue #13555: Fix an integer overflow check. --- Modules/cPickle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/cPickle.c b/Modules/cPickle.c index e73bac1..d74ec5b 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; } -- cgit v0.12