[Python-checkins] cpython: Issue #19437: Fix dec_format() of the _decimal module, handle dec_strdup()
victor.stinner
python-checkins at python.org
Tue Oct 29 20:36:35 CET 2013
http://hg.python.org/cpython/rev/5acbdcfc21c9
changeset: 86749:5acbdcfc21c9
parent: 86746:5bf96a96f31d
user: Victor Stinner <victor.stinner at gmail.com>
date: Tue Oct 29 20:33:14 2013 +0100
summary:
Issue #19437: Fix dec_format() of the _decimal module, handle dec_strdup()
failure (memory allocation failure): raise a MemoryError exception
files:
Modules/_decimal/_decimal.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/Modules/_decimal/_decimal.c b/Modules/_decimal/_decimal.c
--- a/Modules/_decimal/_decimal.c
+++ b/Modules/_decimal/_decimal.c
@@ -3187,6 +3187,7 @@
replace_fillchar = 1;
fmt = dec_strdup(fmt, size);
if (fmt == NULL) {
+ PyErr_NoMemory();
return NULL;
}
fmt[0] = '_';
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list