From 3cb4162cfe6d18a07a15d8c35284d0563dcfff67 Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Wed, 2 Jan 2019 22:32:13 -0200 Subject: lib: fix segfault on freebsd when using vsnprintf() incorrectly FreeBSD's libc segfaults when vsnprintf() is called with a null format string. Add a null check before calling vsnprintf() to resolve this problem. Fixes #3537 Signed-off-by: Renato Westphal --- lib/northbound_cli.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/northbound_cli.h') diff --git a/lib/northbound_cli.h b/lib/northbound_cli.h index 362a4bc32..884f25094 100644 --- a/lib/northbound_cli.h +++ b/lib/northbound_cli.h @@ -60,7 +60,7 @@ extern void nb_cli_enqueue_change(struct vty *vty, const char *xpath, * * xpath_base_fmt * Prepend the given XPath (absolute or relative) to all enqueued - * configuration changes. + * configuration changes. This is an optional parameter. * * Returns: * CMD_SUCCESS on success, CMD_WARNING_CONFIG_FAILED otherwise. -- cgit v1.2.3