Commit f26a63c4 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/h264_cabac: Tighten allowed coeff_abs range

Fixes: integer overflows
Reported-by: 's avatar"Xiaohan Wang (王消寒)" <xhwang@chromium.org>

Based on limits in "8.5 Transform coefficient decoding process and picture
construction process prior to deblocking  filter process"
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent fb580731
......@@ -1735,7 +1735,7 @@ decode_cabac_residual_internal(const H264Context *h, H264SliceContext *sl,
\
if( coeff_abs >= 15 ) { \
int j = 0; \
while (get_cabac_bypass(CC) && j < 30) { \
while (get_cabac_bypass(CC) && j < 16+7) { \
j++; \
} \
\
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment