aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-01-31 04:20:24 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-03-12 00:47:06 +0100
commit98b0751e895e6065cfae65008bee402481a4158c (patch)
treeaa72d7b04c2391c627ae9f08d8dfa3bd04ab2f00 /libavcodec
parenta83b9f363c24f5d1482f9722c14fc02f3ca5a1d0 (diff)
downloadffmpeg-98b0751e895e6065cfae65008bee402481a4158c.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> (cherry picked from commit cdf0877bc341684c56ac1fe057397adbadf329ee) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/h264_cabac.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h264_cabac.c b/libavcodec/h264_cabac.c
index b91883a8f5..c1f4f7c8ee 100644
--- a/libavcodec/h264_cabac.c
+++ b/libavcodec/h264_cabac.c
@@ -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++; \
} \
\