avutil/common: Fix undefined behavior in av_clip_uintp2_c()
authorMichael Niedermayer <michael@niedermayer.cc>
Thu, 14 Jun 2018 13:41:33 +0000 (15:41 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Mon, 22 Oct 2018 23:44:40 +0000 (01:44 +0200)
commit626143903b1d9c102b6c7d402a6fc15906909841
treed4cb524f2fee73cece58e836abd9800d599e2598
parent963915a4b416e944c8f01bc3d635d6b64d8b0022
avutil/common: Fix undefined behavior in av_clip_uintp2_c()

Fixes: negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself
Fixes: 8521/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-5639024952737792

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 aa41d322be71106ce147445f2b42bb763f1eff86)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavutil/common.h