vlib: Fix sh int addr
format_l2_input might return s=0 which
causes vlib_cli_output to print weird
things when calling sh int addr
Type: fix
@@ -703,6 +703,11 @@ vlib_cli_output (vlib_main_t * vm, char *fmt, ...)
s = va_format (0, fmt, &va);
va_end (va);
+ /* some format functions might return 0
+ * e.g. show int addr */
+ if (NULL == s)
+ return;
+
/* Terminate with \n if not present. */
if (vec_len (s) > 0 && s[vec_len (s) - 1] != '\n')
vec_add1 (s, '\n');
