diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2018-02-14 00:32:30 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2018-02-15 14:09:54 +0100 |
commit | 6cfd81b04c7159450a01dadb748b7042559d1dca (patch) | |
tree | ba85007b18f623a1b8a5d607e54cfba1ad9b74ae /libavcodec/h264_cabac.c | |
parent | 07e46226ae50ce0e4754b5cc11fafaffb1d4116a (diff) | |
download | ffmpeg-6cfd81b04c7159450a01dadb748b7042559d1dca.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/h264_cabac.c')
-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 397253ff34..3679bd3df8 100644 --- a/libavcodec/h264_cabac.c +++ b/libavcodec/h264_cabac.c @@ -1732,7 +1732,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++; \ } \ \ |