[FFmpeg-devel] [PATCH] avcodec/hevc_cabac: decrease CABAC_MAX_BIN

Michael Niedermayer michaelni at gmx.at
Mon Apr 28 00:10:11 CEST 2014


Prevents shifts with undefined behavior

Fixes CID1206634
Fixes CID1206635
Fixed CID1206636
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
 libavcodec/hevc_cabac.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/hevc_cabac.c b/libavcodec/hevc_cabac.c
index da7a213..7d04eda 100644
--- a/libavcodec/hevc_cabac.c
+++ b/libavcodec/hevc_cabac.c
@@ -27,7 +27,7 @@
 #include "cabac_functions.h"
 #include "hevc.h"
 
-#define CABAC_MAX_BIN 100
+#define CABAC_MAX_BIN 31
 
 /**
  * number of bin by SyntaxElement.
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list