diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-01-31 04:20:24 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-01-31 04:21:26 +0100 |
commit | cdf0877bc341684c56ac1fe057397adbadf329ee (patch) | |
tree | ef7205ae4afa4649c4cfae360f57afb87829837f | |
parent | fe6767f849d9cfe51f422de9d807137d756de7aa (diff) | |
download | ffmpeg-cdf0877bc341684c56ac1fe057397adbadf329ee.tar.gz |
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>
-rw-r--r-- | libavcodec/h264_cabac.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h264_cabac.c b/libavcodec/h264_cabac.c index bbca26ab4d..54b3775761 100644 --- a/libavcodec/h264_cabac.c +++ b/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++; \ } \ \ |