diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2018-08-12 22:55:59 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2018-11-01 00:52:46 +0100 |
commit | d16d851238f4c056837ba6d8fef4b0c274b8d146 (patch) | |
tree | 41c7569a69d54fe8734d0cdb808599401a7347ea /libavcodec | |
parent | 488c246bf565d56f153874d1348435c7187679a1 (diff) | |
download | ffmpeg-d16d851238f4c056837ba6d8fef4b0c274b8d146.tar.gz |
avcodec/shorten: Fix integer overflow in residual/LPC combination
Fixes: signed integer overflow: -540538872 + -2012739576 cannot be represented in type 'int'
Fixes: 9255/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SHORTEN_fuzzer-5758630052757504
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit db7e9082e1a1479c6a8844f7adf77eae03cc2aa7)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/shorten.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c index 010000d0a1..ad83dfb199 100644 --- a/libavcodec/shorten.c +++ b/libavcodec/shorten.c @@ -391,7 +391,7 @@ static int decode_subframe_lpc(ShortenContext *s, int command, int channel, for (j = 0; j < pred_order; j++) sum += coeffs[j] * (unsigned)s->decoded[channel][i - j - 1]; s->decoded[channel][i] = get_sr_golomb_shorten(&s->gb, residual_size) + - (sum >> qshift); + (unsigned)(sum >> qshift); } /* add offset to current samples */ |