Browse Source

cook: Make sure there is enough extradata

At least 8 bytes are needed (Mono audio).

Bug-Id: CID 741418
CC: libav-stable@libav.org
tags/n2.5
Luca Barbato Vittorio Giovara 11 years ago
parent
commit
299d8ab104
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/cook.c

+ 1
- 1
libavcodec/cook.c View File

@@ -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;
}


Loading…
Cancel
Save