diff --git a/libavcodec/snowdec.c b/libavcodec/snowdec.c index 042aecbbeb..97f55288c1 100644 --- a/libavcodec/snowdec.c +++ b/libavcodec/snowdec.c @@ -395,6 +395,11 @@ static int decode_header(SnowContext *s){ s->block_max_depth= 0; return AVERROR_INVALIDDATA; } + if (FFABS(s->qbias) > 127) { + av_log(s->avctx, AV_LOG_ERROR, "qbias %d is too large\n", s->qbias); + s->qbias = 0; + return AVERROR_INVALIDDATA; + } return 0; }