[Python-checkins] cpython (3.2): #15676: mmap: add empty file check prior to offset check <- Previous patch was
jesus.cea
python-checkins at python.org
Mon Sep 10 22:58:53 CEST 2012
http://hg.python.org/cpython/rev/56a2e862561c
changeset: 78980:56a2e862561c
branch: 3.2
parent: 78977:88a88c32661e
user: Jesus Cea <jcea at jcea.es>
date: Mon Sep 10 22:58:07 2012 +0200
summary:
#15676: mmap: add empty file check prior to offset check <- Previous patch was incomplete (fix 2)
files:
Modules/mmapmodule.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c
--- a/Modules/mmapmodule.c
+++ b/Modules/mmapmodule.c
@@ -1345,6 +1345,7 @@
if (size == 0) {
PyErr_SetString(PyExc_ValueError,
"cannot mmap an empty file");
+ Py_DECREF(m_obj);
return NULL;
}
if (offset >= size) {
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list