diff options
author | Mohsin Kazmi <sykazmi@cisco.com> | 2018-05-18 16:27:26 +0200 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2018-05-19 11:24:01 +0000 |
commit | 2f63bc9482dd1443710ae0321dea69a3f8f21d5b (patch) | |
tree | e468086ce5c373a5b782d6c82c2a80519e487fea /src/vlib | |
parent | 398fdc1a874564c6d31a90fc58ec117fcf58af40 (diff) |
log: Validate the size of vec in vlib_log
Change-Id: I6d1218c17ee055275596b9a49767f15994aa1b2b
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src/vlib')
-rw-r--r-- | src/vlib/log.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/vlib/log.c b/src/vlib/log.c index 1160c04a16d..25d0c4d550c 100644 --- a/src/vlib/log.c +++ b/src/vlib/log.c @@ -142,6 +142,7 @@ vlib_log (vlib_log_level_t level, vlib_log_class_t class, char *fmt, ...) u8 *s = 0; bool use_formatted_log_entry = true; + vec_validate (lm->entries, lm->size); /* make sure we are running on the main thread to avoid use in dataplane code, for dataplane logging consider use of event-logger */ ASSERT (vlib_get_thread_index () == 0); |