diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2012-01-30 14:33:01 -0500 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2012-01-30 19:11:29 -0500 |
commit | 3c4add27f7513f435e9daa03643fd992d5f6bcee (patch) | |
tree | 2aea53f9a21f94ef226f43645da888dbedfaa50d /libavcodec/mpc7.c | |
parent | eac31dd163cd9168860aeed88112455cb44cc4f1 (diff) | |
download | ffmpeg-3c4add27f7513f435e9daa03643fd992d5f6bcee.tar.gz |
mpc7: check for allocation failure
Diffstat (limited to 'libavcodec/mpc7.c')
-rw-r--r-- | libavcodec/mpc7.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/mpc7.c b/libavcodec/mpc7.c index 8bc085392b..6b6bffe357 100644 --- a/libavcodec/mpc7.c +++ b/libavcodec/mpc7.c @@ -224,6 +224,8 @@ static int mpc7_decode_frame(AVCodecContext * avctx, void *data, } bits = av_malloc(((buf_size - 1) & ~3) + FF_INPUT_BUFFER_PADDING_SIZE); + if (!bits) + return AVERROR(ENOMEM); c->dsp.bswap_buf((uint32_t*)bits, (const uint32_t*)(buf + 4), (buf_size - 4) >> 2); init_get_bits(&gb, bits, (buf_size - 4)* 8); skip_bits_long(&gb, buf[0]); |