diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2018-02-14 00:32:30 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2018-06-18 01:16:03 +0200 |
commit | a1e983111ee3a39b245f9c04e62b95f051b47944 (patch) | |
tree | a30c82b7da781962c44f84ab22120f7c61eaf9b8 /libavcodec | |
parent | 988e7a8feaf355e8f008e1065e6903bd06d69df2 (diff) | |
download | ffmpeg-a1e983111ee3a39b245f9c04e62b95f051b47944.tar.gz |
avcodec/h264_cabac: Tighten allowed coeff_abs range
Fixes: integer overflows
Reported-by: "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: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit f26a63c4ee1bdbe21d7ab462cd66f8ba20b14244)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-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 345834645c..2dd6d955d9 100644 --- a/libavcodec/h264_cabac.c +++ b/libavcodec/h264_cabac.c @@ -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++; \ } \ \ |