diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-05-21 11:51:49 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-05-21 12:01:37 +0200 |
commit | 6ef7b6af6be0a1f8d4b355ccb692289857d1f967 (patch) | |
tree | a3b527b04b2364baf2649fe9167d9aa4f3c352ca | |
parent | 877cae6effefb1695bb519070cf5df785ded4415 (diff) | |
parent | cfbd98abe82cfcb9984a18d08697251b72b110c8 (diff) | |
download | ffmpeg-6ef7b6af6be0a1f8d4b355ccb692289857d1f967.tar.gz |
Merge commit 'cfbd98abe82cfcb9984a18d08697251b72b110c8'
* commit 'cfbd98abe82cfcb9984a18d08697251b72b110c8':
mjpegdec: validate parameters in mjpeg_decode_scan_progressive_ac
Conflicts:
libavcodec/mjpegdec.c
See: 1f41cffe1e3e79620f587545bdfcbd7e6e68ed29
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/mjpegdec.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index 9322ffeeb5..ea90f1df76 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -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; } |