avcodec/dirac_dwt_template: Fix undefined behavior in interleave()
authorMichael Niedermayer <michael@niedermayer.cc>
Thu, 14 Jun 2018 14:37:32 +0000 (16:37 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Mon, 22 Oct 2018 23:44:40 +0000 (01:44 +0200)
commita1c125d2bda6cefd940b83156bcd99ec7bd6d868
treed795aeb5d1cbd6114540cc0440f12d82c108e6d8
parent626143903b1d9c102b6c7d402a6fc15906909841
avcodec/dirac_dwt_template: Fix undefined behavior in interleave()

Fixes: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int'
Fixes: 8697/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-5197148130902016

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 575d8ca0260fabac29e5b3541154633569ce2b5d)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/dirac_dwt_template.c