summaryrefslogtreecommitdiff
path: root/libavcodec/cook.c
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2014-11-23 16:09:05 +0100
committerVittorio Giovara <vittorio.giovara@gmail.com>2014-11-24 01:30:15 +0000
commit299d8ab104fb350254eb2e6d9ecdce892a2a55b1 (patch)
treedf23f89825a9dc5d1a358567de3fc23c47bfa0a1 /libavcodec/cook.c
parent30b8eb0f87b0eaefdc115ef38f8ad87dd3a6e50b (diff)
cook: Make sure there is enough extradata
At least 8 bytes are needed (Mono audio). Bug-Id: CID 741418 CC: libav-stable@libav.org
Diffstat (limited to 'libavcodec/cook.c')
-rw-r--r--libavcodec/cook.c2
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;
}