1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Merge commit 'cfbd98abe82cfcb9984a18d08697251b72b110c8'

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

Conflicts:
	libavcodec/mjpegdec.c

See: 1f41cffe1e

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-05-21 11:51:49 +02:00
commit 6ef7b6af6b

View File

@ -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;
}