Commit c2dd01c1 authored by Paul B Mahol's avatar Paul B Mahol

binkaudio: prevent extradata overread

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent 6fef82f2
......@@ -96,7 +96,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
return AVERROR_INVALIDDATA;
}
s->version_b = avctx->extradata && avctx->extradata[3] == 'b';
s->version_b = avctx->extradata_size >= 4 && avctx->extradata[3] == 'b';
if (avctx->codec->id == CODEC_ID_BINKAUDIO_RDFT) {
// audio is already interleaved for the RDFT format variant
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment