diff options
author | Hirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp> | 2009-03-31 20:43:56 +0000 |
---|---|---|
committer | Hirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp> | 2009-03-31 20:43:56 +0000 |
commit | 6869428b3facf8eee4aedd27dffa3fbd3e3c86e7 (patch) | |
tree | 392dd4ded74c615d06dedfedc9ad8543d6d27f49 /Modules/mmapmodule.c | |
parent | 91807bdffaa635ff5798146e42c2e704d15b6668 (diff) | |
download | cpython-6869428b3facf8eee4aedd27dffa3fbd3e3c86e7.tar.gz |
Merged revisions 70879 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r70879 | hirokazu.yamamoto | 2009-04-01 05:14:04 +0900 | 1 line
Issue #5387: Fixed mmap.move crash by integer overflow. (take2)
........
Diffstat (limited to 'Modules/mmapmodule.c')
-rw-r--r-- | Modules/mmapmodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c index c6c8a30182..b9c46cd919 100644 --- a/Modules/mmapmodule.c +++ b/Modules/mmapmodule.c @@ -628,7 +628,7 @@ mmap_move_method(mmap_object *self, PyObject *args) } else { /* bounds check the values */ unsigned long pos = src > dest ? src : dest; - if (self->size >= pos && count > self->size - pos) { + if (self->size < pos || count > self->size - pos) { PyErr_SetString(PyExc_ValueError, "source or destination out of range"); return NULL; |