avcodec/hevc_cabac: Check prefix so as to avoid invalid shifts in coeff_abs_level_rem...
authorMichael Niedermayer <michael@niedermayer.cc>
Mon, 15 Jan 2018 22:46:44 +0000 (23:46 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Mon, 19 Feb 2018 01:40:54 +0000 (02:40 +0100)
commitcedd9ea93ea2f71a57e3b1e9fa01bd7b0cf02bba
tree5d08e16259758675b6ea4f4ad8b61bd3609c613d
parent269aecafabf84109cce914d236131afc99841cfe
avcodec/hevc_cabac: Check prefix so as to avoid invalid shifts in coeff_abs_level_remaining_decode()

I suspect that this can be limited tighter, but i failed to find anything
in the spec that would confirm that.

Fixes: 4833/clusterfuzz-testcase-minimized-5302840101699584
Fixes: runtime error: left shift of 134217730 by 4 places cannot be represented in type 'int'

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