]> granicus.if.org Git - python/commitdiff
ensure read size is initialized
authorBenjamin Peterson <benjamin@python.org>
Thu, 6 Oct 2016 06:32:09 +0000 (23:32 -0700)
committerBenjamin Peterson <benjamin@python.org>
Thu, 6 Oct 2016 06:32:09 +0000 (23:32 -0700)
Modules/mmapmodule.c

index e01de441bd6609f357f38c46eea9c87f7a38c2b8..4eb9274c665e7c94a56f5d203a0ef591ac939607 100644 (file)
@@ -267,7 +267,7 @@ static PyObject *
 mmap_read_method(mmap_object *self,
                  PyObject *args)
 {
-    Py_ssize_t num_bytes, remaining;
+    Py_ssize_t num_bytes = PY_SSIZE_T_MAX, remaining;
     PyObject *result;
 
     CHECK_VALID(NULL);