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>
(cherry picked from commit cdf0877bc341684c56ac1fe057397adbadf329ee)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-01-31 04:20:24 +01:00
parent a83b9f363c
commit 98b0751e89

View File

@ -1701,7 +1701,7 @@ static av_always_inline void decode_cabac_residual_internal( H264Context *h, DCT
\
if( coeff_abs >= 15 ) { \
int j = 0; \
while( get_cabac_bypass( CC ) ) { \
while(get_cabac_bypass( CC ) && j<30) { \
j++; \
} \
\