[Python-checkins] cpython (2.7): #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:51 CEST 2012


http://hg.python.org/cpython/rev/39efccf7a167
changeset: 78979:39efccf7a167
branch: 2.7
parent: 78976:25d477647a2d
user: Jesus Cea <jcea at jcea.es>
date: Mon Sep 10 22:57:34 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
@@ -1391,6 +1391,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

AltStyle によって変換されたページ (->オリジナル) /