diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-07-27 23:49:26 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-07-29 14:18:35 +0200 |
commit | 6274709c1c110cbb714a2bd0292bb9e96d9d561f (patch) | |
tree | c2ddbe06fc15884a264622f539e6f9116260629f /libavcodec | |
parent | 06ce68d8a07d6365d67fdd8ed3c1e422f97a43fa (diff) | |
download | ffmpeg-6274709c1c110cbb714a2bd0292bb9e96d9d561f.tar.gz |
avcodec/takdec: Fix integer overflow in decode_subframe()
Fixes: runtime error: signed integer overflow: -536870912 - 1972191120 cannot be represented in type 'int'
Fixes: 2711/clusterfuzz-testcase-minimized-4975142398590976
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 2c630d159ffe8a9822e81f9c041652762b37e068)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/takdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/takdec.c b/libavcodec/takdec.c index c4c4b30aba..c74e952562 100644 --- a/libavcodec/takdec.c +++ b/libavcodec/takdec.c @@ -489,7 +489,7 @@ static int decode_subframe(TAKDecContext *s, int32_t *decoded, s->residues[i + j + 1] * s->filter[j + 1] + s->residues[i + j ] * s->filter[j ]; } - v = (av_clip_intp2(v >> filter_quant, 13) * (1 << dshift)) - *decoded; + v = (av_clip_intp2(v >> filter_quant, 13) * (1 << dshift)) - (unsigned)*decoded; *decoded++ = v; s->residues[filter_order + i] = v >> dshift; } |