summaryrefslogtreecommitdiff
path: root/libavcodec/binkaudio.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2012-06-09 10:30:31 +0000
committerPaul B Mahol <onemda@gmail.com>2012-06-09 10:43:20 +0000
commitc2dd01c16fb13aed5f4896bbe14ea65db5d66862 (patch)
tree4ea7ddb2c8da24ee5c2973bcddbe10a6dac4cf57 /libavcodec/binkaudio.c
parent6fef82f22df863c59446228156fb3f7ce826f5a2 (diff)
binkaudio: prevent extradata overread
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec/binkaudio.c')
-rw-r--r--libavcodec/binkaudio.c2
1 files changed, 1 insertions, 1 deletions
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