]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[libvpx] scan-build: Assigned value is garbage or undefined
authorAndrey Volk <andywolk@gmail.com>
Fri, 23 Apr 2021 11:46:06 +0000 (14:46 +0300)
committerAndrey Volk <andywolk@gmail.com>
Tue, 19 Oct 2021 17:26:52 +0000 (20:26 +0300)
libs/libvpx/vp9/encoder/vp9_subexp.c

index 19bbd5373fdf275a06b9a6900a3443a3c3fd01e6..cf17fcdfcec118eeac5d5dbf56f9be42a1c26018 100644 (file)
@@ -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;
 }