From 3e7f34a3fb18338be67fca6c40812e41fb7400e3 Mon Sep 17 00:00:00 2001 From: James Zern Date: Fri, 14 Mar 2014 18:47:52 -0700 Subject: [PATCH] AssignSegments: quiet array-bounds warning nb (enc->segment_hdr_.num_segments_) will be in the range [1, NUM_MB_SEGMENTS]. Change-Id: I5c2bd0bb82b17c99aff39c98b6b1747fc040dc16 --- src/enc/analysis.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/enc/analysis.c b/src/enc/analysis.c index 639fc1e4..de031b9f 100644 --- a/src/enc/analysis.c +++ b/src/enc/analysis.c @@ -151,6 +151,7 @@ static void AssignSegments(VP8Encoder* const enc, int accum[NUM_MB_SEGMENTS], dist_accum[NUM_MB_SEGMENTS]; assert(nb >= 1); + assert(nb <= NUM_MB_SEGMENTS); // bracket the input for (n = 0; n <= MAX_ALPHA && alphas[n] == 0; ++n) {}