summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2019-04-12 10:01:17 +0200
committerNeale Ranns <nranns@cisco.com>2019-04-12 18:57:37 +0000
commite0a04cf5cec49fc6fb70687622ea3a34e3fd0247 (patch)
treeb572093b0a5e0f1de45f950e08e14bd56def9d4e
parent4736f6d9435eaad699f6e1da9c46d2a410123d9c (diff)
stats: Off by one error in stats directory vector.
Change-Id: Ic75af8bbd52c8a08e34ff2a847f60be5479b814b Signed-off-by: Ole Troan <ot@cisco.com> (cherry picked from commit 1c9a58decd525ad46487b120642883089fb5758f)
-rw-r--r--src/vpp/stats/stat_segment.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vpp/stats/stat_segment.c b/src/vpp/stats/stat_segment.c
index d2a410cb3a5..05b8cdcb34d 100644
--- a/src/vpp/stats/stat_segment.c
+++ b/src/vpp/stats/stat_segment.c
@@ -277,7 +277,7 @@ vlib_map_stat_segment_init (void)
shared_header->epoch = 1;
/* Scalar stats and node counters */
- vec_validate (sm->directory_vector, STAT_COUNTERS - 1);
+ vec_validate (sm->directory_vector, STAT_COUNTERS);
#define _(E,t,n,p) \
strcpy(sm->directory_vector[STAT_COUNTER_##E].name, #p "/" #n); \
sm->directory_vector[STAT_COUNTER_##E].type = STAT_DIR_TYPE_##t;