Commit bc16031a authored by Michael Niedermayer's avatar Michael Niedermayer

mjpegdec: print error message when quant_index is invalid

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent a2f680c7
......@@ -283,8 +283,10 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
return -1;
}
s->quant_index[i] = get_bits(&s->gb, 8);
if (s->quant_index[i] >= 4)
if (s->quant_index[i] >= 4) {
av_log(s->avctx, AV_LOG_ERROR, "quant_index is invalid\n");
return AVERROR_INVALIDDATA;
}
av_log(s->avctx, AV_LOG_DEBUG, "component %d %d:%d id: %d quant:%d\n",
i, h_count[i], v_count[i],
s->component_id[i], s->quant_index[i]);
......
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