Commit 36241c40 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/jpeg2000dec: Fix term_cnt check

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 918abc19
......@@ -1389,7 +1389,7 @@ static int decode_cblk(Jpeg2000DecoderContext *s, Jpeg2000CodingStyle *codsty,
ff_mqc_init_contexts(&t1->mqc);
if (passno && (coder_type = needs_termination(codsty->cblk_style, pass_cnt))) {
if (term_cnt > cblk->nb_terminations) {
if (term_cnt >= cblk->nb_terminations) {
av_log(s->avctx, AV_LOG_ERROR, "Missing needed termination \n");
return AVERROR_INVALIDDATA;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment