Commit 6ef7b6af authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'cfbd98ab'

* commit 'cfbd98ab':
  mjpegdec: validate parameters in mjpeg_decode_scan_progressive_ac

Conflicts:
	libavcodec/mjpegdec.c

See: 1f41cffeMerged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 877cae6e cfbd98ab
......@@ -1134,8 +1134,9 @@ static int mjpeg_decode_scan_progressive_ac(MJpegDecodeContext *s, int ss,
int last_scan = 0;
int16_t *quant_matrix = s->quant_matrixes[s->quant_index[c]];
if (se > 63) {
av_log(s->avctx, AV_LOG_ERROR, "SE %d is too large\n", se);
av_assert0(ss>=0 && Ah>=0 && Al>=0);
if (se < ss || se > 63) {
av_log(s->avctx, AV_LOG_ERROR, "SS/SE %d/%d is invalid\n", ss, se);
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