summaryrefslogtreecommitdiffstats
path: root/libavcodec/wmavoice.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/wmavoice.c')
-rw-r--r--libavcodec/wmavoice.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/wmavoice.c b/libavcodec/wmavoice.c
index 68bb659..4c147fe 100644
--- a/libavcodec/wmavoice.c
+++ b/libavcodec/wmavoice.c
@@ -433,6 +433,9 @@ static av_cold int wmavoice_decode_init(AVCodecContext *ctx)
return AVERROR_INVALIDDATA;
}
+ if (ctx->sample_rate >= INT_MAX / (256 * 37))
+ return AVERROR_INVALIDDATA;
+
s->min_pitch_val = ((ctx->sample_rate << 8) / 400 + 50) >> 8;
s->max_pitch_val = ((ctx->sample_rate << 8) * 37 / 2000 + 50) >> 8;
pitch_range = s->max_pitch_val - s->min_pitch_val;
OpenPOWER on IntegriCloud