avcodec/mdct_*: Fix integer overflow in addition in RESCALE()
authorMichael Niedermayer <michael@niedermayer.cc>
Sun, 5 Nov 2017 20:20:06 +0000 (21:20 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Fri, 1 Dec 2017 23:28:59 +0000 (00:28 +0100)
commitf2763b8ba80cb258663807a5e61f028564b02ac3
treecd5218ca4c2bc09c9214c63c76c2e8cb74be34aa
parentf33f13172cfe34b3bedb59964957d8d784f9cea0
avcodec/mdct_*: Fix integer overflow in addition in RESCALE()

Fixes: runtime error: signed integer overflow: 1219998458 - -1469874012 cannot be represented in type 'int'
Fixes: 3443/clusterfuzz-testcase-minimized-5369987105554432

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 770c934fa1635f4fadf5db4fc5cc5ad15d82455a)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/mdct_fixed.c
libavcodec/mdct_template.c