Issue #5387: Fixed mmap.move crash by integer overflow. (take2)
diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c
index bd7f7cc..cbacc2f 100644
--- a/Modules/mmapmodule.c
+++ b/Modules/mmapmodule.c
@@ -617,7 +617,7 @@
} 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;