diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2014-11-23 16:09:05 +0100 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2015-01-13 00:16:40 +0100 |
commit | 484e015dc8b9983297e9269b406c65084daf4528 (patch) | |
tree | 2d174f1a8f079333c973bccd2f56e5553d54db3a | |
parent | b82170336f90d06c645d8252ddeccfc92c2f9ccb (diff) | |
download | ffmpeg-484e015dc8b9983297e9269b406c65084daf4528.tar.gz |
cook: Make sure there is enough extradata
At least 8 bytes are needed (Mono audio).
Bug-Id: CID 741418
CC: libav-stable@libav.org
(cherry picked from commit 299d8ab104fb350254eb2e6d9ecdce892a2a55b1)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
-rw-r--r-- | libavcodec/cook.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/cook.c b/libavcodec/cook.c index 056c7d90f6..8c2fab7a27 100644 --- a/libavcodec/cook.c +++ b/libavcodec/cook.c @@ -1051,7 +1051,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx) q->avctx = avctx; /* Take care of the codec specific extradata. */ - if (extradata_size <= 0) { + if (extradata_size < 8) { av_log(avctx, AV_LOG_ERROR, "Necessary extradata missing!\n"); return AVERROR_INVALIDDATA; } |