mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
avcodec/apac: use unsigned for sample residual
Fixes: signed integer overflow: -2146670226 + -2227242 cannot be represented in type 'int' Fixes: 51943/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APAC_fuzzer-5779018251370496 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
8f975641d7
commit
b2c1a0fc2b
@ -208,7 +208,7 @@ static int apac_decode(AVCodecContext *avctx, AVFrame *frame,
|
||||
|
||||
for (int i = 0; i < c->block_length; i++) {
|
||||
int val = get_bits_long(gb, c->bit_length);
|
||||
int delta = (val & 1) ? ~(val >> 1) : (val >> 1);
|
||||
unsigned delta = (val & 1) ? ~(val >> 1) : (val >> 1);
|
||||
int sample;
|
||||
|
||||
delta += c->last_delta;
|
||||
|
Loading…
Reference in New Issue
Block a user