avcodec/g2meet: Change order of operations to avoid undefined behavior
authorMichael Niedermayer <michael@niedermayer.cc>
Fri, 4 May 2018 16:16:08 +0000 (18:16 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Mon, 16 Jul 2018 17:06:26 +0000 (19:06 +0200)
commit6315215e5c0b4052f66f5f0f4311acd2031fb43c
tree82dc2c77196347156b45ec29095d7c7e4b599660
parent90e9b76d3a9b4e220e7636fdc7672f1e91924a6c
avcodec/g2meet: Change order of operations to avoid undefined behavior

Fixes: signed integer overflow: 65280 * 196032 cannot be represented in type 'int'
Fixes: 7279/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_G2M_fuzzer-5977332473921536

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 0a4745145840d97619c424961c1b5c625dbf516c)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/g2meet.c