diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2018-02-14 00:32:30 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2018-07-08 19:30:10 +0200 |
commit | ed04cbf62b48ef987da547af1a1ba5216a14e037 (patch) | |
tree | 131d8ef98bf103c6241569ebd80478e1e9ea16c2 | |
parent | f4ff8845e232db35c2fbd36f877b2597b6287fec (diff) | |
download | ffmpeg-ed04cbf62b48ef987da547af1a1ba5216a14e037.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>
-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 c59e7388a3..bc2105235f 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++; \ } \ \ |