Re: [FFmpeg-devel] [PATCH] avcodec/h264_cabac: Tighten allowed coeff_abs range

2018-02-15 Thread Michael Niedermayer
On Wed, Feb 14, 2018 at 12:32:30AM +0100, Michael Niedermayer wrote:
> Fixes: integer overflows
> Reported-by: "Xiaohan Wang (王消寒)" 
> 
> Based on limits in "8.5 Transform coefficient decoding process and picture
> construction process prior to deblocking  filter process"
> ---
>  libavcodec/h264_cabac.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

will apply

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The bravest are surely those who have the clearest vision
of what is before them, glory and danger alike, and yet
notwithstanding go out to meet it. -- Thucydides


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] avcodec/h264_cabac: Tighten allowed coeff_abs range

2018-02-13 Thread Michael Niedermayer
Fixes: integer overflows
Reported-by: "Xiaohan Wang (王消寒)" 

Based on limits in "8.5 Transform coefficient decoding process and picture
construction process prior to deblocking  filter process"
---
 libavcodec/h264_cabac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/h264_cabac.c b/libavcodec/h264_cabac.c
index ec5fc74b9b..815149a501 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++; \
 } \
 \
-- 
2.16.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel