diff --git a/libavcodec/wmavoice.c b/libavcodec/wmavoice.c index 4c764a8f01..6f46fe3c8a 100644 --- a/libavcodec/wmavoice.c +++ b/libavcodec/wmavoice.c @@ -382,7 +382,7 @@ static av_cold int wmavoice_decode_init(AVCodecContext *ctx) ctx->extradata_size); return AVERROR_INVALIDDATA; } - if (ctx->block_align <= 0) { + if (ctx->block_align <= 0 || ctx->block_align > (1<<22)) { av_log(ctx, AV_LOG_ERROR, "Invalid block alignment %d.\n", ctx->block_align); return AVERROR_INVALIDDATA; }