[Python-checkins] cpython: MultibyteCodec_Decode() catchs PyUnicode_AS_UNICODE() failures
victor.stinner
python-checkins at python.org
Thu Dec 1 03:16:37 CET 2011
http://hg.python.org/cpython/rev/7216cf767993
changeset: 73802:7216cf767993
user: Victor Stinner <victor.stinner at haypocalc.com>
date: Thu Dec 01 03:18:30 2011 +0100
summary:
MultibyteCodec_Decode() catchs PyUnicode_AS_UNICODE() failures
files:
Modules/cjkcodecs/multibytecodec.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/Modules/cjkcodecs/multibytecodec.c b/Modules/cjkcodecs/multibytecodec.c
--- a/Modules/cjkcodecs/multibytecodec.c
+++ b/Modules/cjkcodecs/multibytecodec.c
@@ -643,6 +643,8 @@
if (buf.outobj == NULL)
goto errorexit;
buf.outbuf = PyUnicode_AS_UNICODE(buf.outobj);
+ if (buf.outbuf == NULL)
+ goto errorexit;
buf.outbuf_end = buf.outbuf + PyUnicode_GET_SIZE(buf.outobj);
if (self->codec->decinit != NULL &&
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list