diff options
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 c6c8a30..b9c46cd 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; |