mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec/adpcmenc: fix integer overflow / undefined behavior in STORE_NODE()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
1aa60980d2
commit
049b20b287
@ -332,7 +332,7 @@ static void adpcm_compress_trellis(AVCodecContext *avctx,
|
||||
uint8_t *h;\
|
||||
dec_sample = av_clip_int16(dec_sample);\
|
||||
d = sample - dec_sample;\
|
||||
ssd = nodes[j]->ssd + d*d;\
|
||||
ssd = nodes[j]->ssd + d*(unsigned)d;\
|
||||
/* Check for wraparound, skip such samples completely. \
|
||||
* Note, changing ssd to a 64 bit variable would be \
|
||||
* simpler, avoiding this check, but it's slower on \
|
||||
|
Loading…
Reference in New Issue
Block a user