diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-12-01 02:18:30 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-12-01 02:18:30 (GMT) |
commit | 08b523a194a066e1e758e12594d8e423b57460a9 (patch) | |
tree | 52f7b5691bf724665eb7372bc7d362f5df061532 /Modules/cjkcodecs | |
parent | 3ba82aa765fc1a176603ca00b447aafe583ae5a0 (diff) | |
download | cpython-08b523a194a066e1e758e12594d8e423b57460a9.zip cpython-08b523a194a066e1e758e12594d8e423b57460a9.tar.gz cpython-08b523a194a066e1e758e12594d8e423b57460a9.tar.bz2 |
MultibyteCodec_Decode() catchs PyUnicode_AS_UNICODE() failures
Diffstat (limited to 'Modules/cjkcodecs')
-rw-r--r-- | Modules/cjkcodecs/multibytecodec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/cjkcodecs/multibytecodec.c b/Modules/cjkcodecs/multibytecodec.c index 1d6db95..ded9188 100644 --- a/Modules/cjkcodecs/multibytecodec.c +++ b/Modules/cjkcodecs/multibytecodec.c @@ -643,6 +643,8 @@ MultibyteCodec_Decode(MultibyteCodecObject *self, 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 && |