summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libavcodec/binkaudio.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/binkaudio.c b/libavcodec/binkaudio.c
index 96cf968..2384ebf 100644
--- a/libavcodec/binkaudio.c
+++ b/libavcodec/binkaudio.c
@@ -95,6 +95,8 @@ static av_cold int decode_init(AVCodecContext *avctx)
if (avctx->codec->id == AV_CODEC_ID_BINKAUDIO_RDFT) {
// audio is already interleaved for the RDFT format variant
avctx->sample_fmt = AV_SAMPLE_FMT_FLT;
+ if (sample_rate > INT_MAX / avctx->channels)
+ return AVERROR_INVALIDDATA;
sample_rate *= avctx->channels;
s->channels = 1;
if (!s->version_b)
OpenPOWER on IntegriCloud