aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2018-02-14 00:32:30 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2018-04-13 00:35:15 +0200
commit878fc42a906d13cd6a78b0820eed75f4fd8e26e5 (patch)
treebb5e01001b7c2a52c0f599d8f16a0e521a3e1806
parente8fb74c0c9cd3bad7f990b8cf98b56ab54ae3a9c (diff)
downloadffmpeg-878fc42a906d13cd6a78b0820eed75f4fd8e26e5.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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h264_cabac.c b/libavcodec/h264_cabac.c
index 04b77f284f..1e05c04680 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++; \
} \
\