avcodec/hevc_ps: fix integer overflow in log2_parallel_merge_level_minus2
authorMichael Niedermayer <michael@niedermayer.cc>
Mon, 24 Jul 2017 13:48:37 +0000 (15:48 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Wed, 26 Jul 2017 15:24:25 +0000 (17:24 +0200)
commit2f75ebe24a775b00236f34a083a806f60e162c57
treed690d358f1690b90c37ae6dc6acfcbbea102e024
parenta9081b36f4d2193b2d9df059bf668f752dbfd636
avcodec/hevc_ps: fix integer overflow in log2_parallel_merge_level_minus2

Fixes: runtime error: signed integer overflow: -2147483647 - 2 cannot be represented in type 'int'
Fixes: 2702/clusterfuzz-testcase-minimized-4511932591636480

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 74c1c22d7f0d25f527ed2ebf62493be5ad52c972)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/hevc_ps.c