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, 9 Jul 2018 23:52:56 +0000 (01:52 +0200)
commit02f4e846d2883871a2bb19175875f58e1d700cc2
treee8ba86a991919f02de16662f11b725ab95a18aaa
parent8e3918f1db50544b5f2255c41323de6cf6258e81
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