From c2dd01c16fb13aed5f4896bbe14ea65db5d66862 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Sat, 9 Jun 2012 10:30:31 +0000 Subject: binkaudio: prevent extradata overread Signed-off-by: Paul B Mahol --- libavcodec/binkaudio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavcodec') diff --git a/libavcodec/binkaudio.c b/libavcodec/binkaudio.c index ee66b8b51e..591c6ab598 100644 --- a/libavcodec/binkaudio.c +++ b/libavcodec/binkaudio.c @@ -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 -- cgit v1.2.3