aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vlibapi/api_shared.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vlibapi/api_shared.c b/src/vlibapi/api_shared.c
index 5e715d6f829..ec74b5fe357 100644
--- a/src/vlibapi/api_shared.c
+++ b/src/vlibapi/api_shared.c
@@ -454,7 +454,7 @@ msg_handler_internal (api_main_t * am,
u32 c;
} *ed;
ed = ELOG_DATA (am->elog_main, e);
- if (id < vec_len (am->msg_names))
+ if (id < vec_len (am->msg_names) && am->msg_names[id])
ed->c = elog_string (am->elog_main, (char *) am->msg_names[id]);
else
ed->c = elog_string (am->elog_main, "BOGUS");
@@ -537,7 +537,7 @@ msg_handler_internal (api_main_t * am,
u32 c;
} *ed;
ed = ELOG_DATA (am->elog_main, e);
- if (id < vec_len (am->msg_names))
+ if (id < vec_len (am->msg_names) && am->msg_names[id])
{
ed->c = elog_string (am->elog_main, (char *) am->msg_names[id]);
ed->barrier = !am->is_mp_safe[id];
@@ -579,7 +579,7 @@ vl_msg_api_handler_with_vm_node (api_main_t * am, svm_region_t * vlib_rp,
u32 c;
} *ed;
ed = ELOG_DATA (am->elog_main, e);
- if (id < vec_len (am->msg_names))
+ if (id < vec_len (am->msg_names) && am->msg_names[id])
ed->c = elog_string (am->elog_main, (char *) am->msg_names[id]);
else
ed->c = elog_string (am->elog_main, "BOGUS");
@@ -678,7 +678,7 @@ vl_msg_api_handler_with_vm_node (api_main_t * am, svm_region_t * vlib_rp,
u32 c;
} *ed;
ed = ELOG_DATA (am->elog_main, e);
- if (id < vec_len (am->msg_names))
+ if (id < vec_len (am->msg_names) && am->msg_names[id])
ed->c = elog_string (am->elog_main, (char *) am->msg_names[id]);
else
ed->c = elog_string (am->elog_main, "BOGUS");