From 51ef2f261ae942aa57ecf257cd11f6df2538480d Mon Sep 17 00:00:00 2001 From: Andrey Volk Date: Fri, 23 Apr 2021 14:46:06 +0300 Subject: [PATCH] [libvpx] scan-build: Assigned value is garbage or undefined --- libs/libvpx/vp9/encoder/vp9_subexp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/libvpx/vp9/encoder/vp9_subexp.c b/libs/libvpx/vp9/encoder/vp9_subexp.c index 19bbd5373f..cf17fcdfce 100644 --- a/libs/libvpx/vp9/encoder/vp9_subexp.c +++ b/libs/libvpx/vp9/encoder/vp9_subexp.c @@ -72,7 +72,7 @@ static int remap_prob(int v, int m) { i = recenter_nonneg(MAX_PROB - 1 - v, MAX_PROB - 1 - m) - 1; assert(i >= 0 && (size_t)i < sizeof(map_table)); - i = map_table[i]; + if (i >= 0 && (size_t)i < sizeof(map_table)) i = map_table[i]; return i; }