[Python-checkins] cpython (2.7): Issue #13555: Fix an integer overflow check.

serhiy.storchaka python-checkins at python.org
Tue Feb 26 09:08:42 CET 2013


http://hg.python.org/cpython/rev/f3f23ecdb1c6
changeset:   82390:f3f23ecdb1c6
branch:      2.7
parent:      82378:d707e3345a74
user:        Serhiy Storchaka <storchaka at gmail.com>
date:        Tue Feb 26 10:07:36 2013 +0200
summary:
  Issue #13555: Fix an integer overflow check.

files:
  Modules/cPickle.c |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Modules/cPickle.c b/Modules/cPickle.c
--- a/Modules/cPickle.c
+++ b/Modules/cPickle.c
@@ -595,7 +595,7 @@
                 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;
         }

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list