h264/cabac: check loop index

fix out of array read

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/9/head
Michael Niedermayer 12 years ago
parent fe6767f849
commit cdf0877bc3
  1. 2
      libavcodec/h264_cabac.c

@ -1712,7 +1712,7 @@ decode_cabac_residual_internal(H264Context *h, int16_t *block,
\
if( coeff_abs >= 15 ) { \
int j = 0; \
while( get_cabac_bypass( CC ) ) { \
while(get_cabac_bypass( CC ) && j<30) { \
j++; \
} \
\

Loading…
Cancel
Save