[FFmpeg-cvslog] cook: Make sure there is enough extradata

Luca Barbato git at videolan.org
Sun Jan 18 02:08:32 CET 2015


ffmpeg | branch: release/2.4 | Luca Barbato <lu_zero at gentoo.org> | Sun Nov 23 16:09:05 2014 +0100| [484e015dc8b9983297e9269b406c65084daf4528] | committer: Luca Barbato

cook: Make sure there is enough extradata

At least 8 bytes are needed (Mono audio).

Bug-Id: CID 741418
CC: libav-stable at libav.org
(cherry picked from commit 299d8ab104fb350254eb2e6d9ecdce892a2a55b1)
Signed-off-by: Luca Barbato <lu_zero at gentoo.org>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=484e015dc8b9983297e9269b406c65084daf4528
---

 libavcodec/cook.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/cook.c b/libavcodec/cook.c
index 056c7d9..8c2fab7 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;
     }



More information about the ffmpeg-cvslog mailing list