Merge commit '299d8ab104fb350254eb2e6d9ecdce892a2a55b1'
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 24 Nov 2014 12:16:37 +0000 (13:16 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 24 Nov 2014 12:18:41 +0000 (13:18 +0100)
* commit '299d8ab104fb350254eb2e6d9ecdce892a2a55b1':
  cook: Make sure there is enough extradata

See: c9e455432988acd414990ba92f782b8e3c4b6aea
Merged-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/cook.c

index 0cc01d05c9cab72b8b1b4d24f8178f46a2d9062f..cfbce2a58a24ed954974a9b52dded19411cf4b38 100644 (file)
@@ -1058,7 +1058,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;
     }