[Python-checkins] cpython (merge 3.2 -> default): MERGE: #15676: mmap: add empty file check prior to offset check <- Previous
jesus.cea
python-checkins at python.org
Mon Sep 10 22:58:54 CEST 2012
http://hg.python.org/cpython/rev/306b2ecb1a3e
changeset: 78981:306b2ecb1a3e
parent: 78978:0ac94ae29abe
parent: 78980:56a2e862561c
user: Jesus Cea <jcea at jcea.es>
date: Mon Sep 10 22:58:35 2012 +0200
summary:
MERGE: #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
@@ -1367,6 +1367,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