]> git.proxmox.com Git - mirror_frr.git/commit
lib: fix segfault on freebsd when using vsnprintf() incorrectly
authorRenato Westphal <renato@opensourcerouting.org>
Thu, 3 Jan 2019 00:32:13 +0000 (22:32 -0200)
committerRenato Westphal <renato@opensourcerouting.org>
Thu, 3 Jan 2019 00:32:13 +0000 (22:32 -0200)
commit3cb4162cfe6d18a07a15d8c35284d0563dcfff67
tree13f764adbc99ffc58b52c42036c2c74877c3bcd6
parent6205e5dc070c2cbb34dfc33898e185f7f6058d75
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 <renato@opensourcerouting.org>
lib/northbound_cli.c
lib/northbound_cli.h