From f5931e5e61dfe1d4c4c24f5977a11634226d1c60 Mon Sep 17 00:00:00 2001 From: Alex Converse Date: Fri, 17 Mar 2017 09:52:50 -0700 Subject: [PATCH] Fix off by one in an assert. 'bits' can be (less than or) equal to sizeof(av1_cat6_prob). BUG=aomedia:399 Change-Id: I20ceb6fa3b61dfcc59e28605fe4f90d8bfaacc51 --- av1/common/entropy.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/av1/common/entropy.h b/av1/common/entropy.h index 8135e928c..7d0851ae7 100644 --- a/av1/common/entropy.h +++ b/av1/common/entropy.h @@ -120,7 +120,7 @@ static INLINE int av1_get_cat6_extrabits_size(TX_SIZE tx_size, if (tx_size > TX_32X32) tx_size = TX_32X32; #endif int bits = (int)bit_depth + 3 + (int)tx_size; - assert(bits < (int)sizeof(av1_cat6_prob)); + assert(bits <= (int)sizeof(av1_cat6_prob)); return bits; }