diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-12-17 15:19:42 +0100 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-12-18 23:27:14 +0100 |
commit | 5ac06633cb63fcc51f2471a3478b44d3f010b16b (patch) | |
tree | 2bbbe154a6d0c22a1d9a4350307274575a684d8b | |
parent | 16c7a8a142277aa3c98b4802ee57daaebe6999e5 (diff) | |
download | ffmpeg-5ac06633cb63fcc51f2471a3478b44d3f010b16b.tar.gz |
takdec: check av_samples_get_buffer_size() return value
CC: libav-stable@libav.org
Bug-Id: CID 747734
-rw-r--r-- | libavcodec/takdec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/takdec.c b/libavcodec/takdec.c index b0e84ea3c0..16ccdba9b1 100644 --- a/libavcodec/takdec.c +++ b/libavcodec/takdec.c @@ -748,6 +748,8 @@ static int tak_decode_frame(AVCodecContext *avctx, void *data, int buf_size = av_samples_get_buffer_size(NULL, avctx->channels, s->nb_samples, AV_SAMPLE_FMT_S32P, 0); + if (buf_size < 0) + return buf_size; av_fast_malloc(&s->decode_buffer, &s->decode_buffer_size, buf_size); if (!s->decode_buffer) return AVERROR(ENOMEM); |