Browse Source

binkaudio: prevent extradata overread

Signed-off-by: Paul B Mahol <onemda@gmail.com>
tags/n1.0
Paul B Mahol 13 years ago
parent
commit
c2dd01c16f
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/binkaudio.c

+ 1
- 1
libavcodec/binkaudio.c View File

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


Loading…
Cancel
Save