MultibyteCodec_Decode() catchs PyUnicode_AS_UNICODE() failures

This commit is contained in:
Victor Stinner 2011-12-01 03:18:30 +01:00
parent 3ba82aa765
commit 08b523a194
1 changed files with 2 additions and 0 deletions

View File

@ -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 &&