mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
mjpegdec: check SE.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
e56b098410
commit
1f41cffe1e
@ -1095,6 +1095,11 @@ static int mjpeg_decode_scan_progressive_ac(MJpegDecodeContext *s, int ss,
|
|||||||
int last_scan = 0;
|
int last_scan = 0;
|
||||||
int16_t *quant_matrix = s->quant_matrixes[s->quant_index[c]];
|
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);
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
}
|
||||||
|
|
||||||
if (!Al) {
|
if (!Al) {
|
||||||
s->coefs_finished[c] |= (1LL << (se + 1)) - (1LL << ss);
|
s->coefs_finished[c] |= (1LL << (se + 1)) - (1LL << ss);
|
||||||
last_scan = !~s->coefs_finished[c];
|
last_scan = !~s->coefs_finished[c];
|
||||||
|
Loading…
Reference in New Issue
Block a user