mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-02-08 02:39:57 +00:00
avcodec/mjpegdec: Fix DC overflow in decode_block()
Fixes Ticket4683 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
90dd6ad22c
commit
dffae122d0
1 changed files with 1 additions and 0 deletions
|
|
@ -672,6 +672,7 @@ static int decode_block(MJpegDecodeContext *s, int16_t *block, int component,
|
|||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
val = val * quant_matrix[0] + s->last_dc[component];
|
||||
val = FFMIN(val, 32767);
|
||||
s->last_dc[component] = val;
|
||||
block[0] = val;
|
||||
/* AC coefs */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue