Permalink
Browse files

Map.c check should be against PY_SSIZE_T_MAX (#2151)

  • Loading branch information...
1 parent d6193e2 commit 7d6f4104a114d106cd9502e040a78e793fb72393 @wiredfool wiredfool committed Oct 4, 2016
Showing with 1 addition and 1 deletion.
  1. +1 −1 map.c
View
@@ -349,7 +349,7 @@ PyImaging_MapBuffer(PyObject* self, PyObject* args)
size = (Py_ssize_t) ysize * stride;
- if (offset > SIZE_MAX - size) {
+ if (offset > PY_SSIZE_T_MAX - size) {
PyErr_SetString(PyExc_MemoryError, "Integer overflow in offset");
return NULL;
}

0 comments on commit 7d6f410

Please sign in to comment.