[libav-commits] hevc_cabac: decrease CABAC_MAX_BIN

Michael Niedermayer git at libav.org
Tue Nov 11 13:04:51 CET 2014


Module: libav
Branch: master
Commit: a6defd1f5b1bffcea7aa00ff379a6602cdaf2d05

Author:    Michael Niedermayer <michaelni at gmx.at>
Committer: Vittorio Giovara <vittorio.giovara at gmail.com>
Date:      Sun Nov  9 08:48:38 2014 +0100

hevc_cabac: decrease CABAC_MAX_BIN

Prevents shifts with undefined behavior, as no syntax element has a valid
value greater than 1 << 31.

Bug-Id: CID 1206635

---

 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 ff55b02..276cd33 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.



More information about the libav-commits mailing list