From 0ef34ac51ad2d522daf18e5a2b6e1fa987cbb412 Mon Sep 17 00:00:00 2001 From: paco Date: Mon, 25 Jun 2018 16:47:15 +0200 Subject: [PATCH] ldpd: null check (Coverity 1452317) Signed-off-by: F. Aragon --- ldpd/ldp_vty_conf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ldpd/ldp_vty_conf.c b/ldpd/ldp_vty_conf.c index e5832c5086..4ef57f574a 100644 --- a/ldpd/ldp_vty_conf.c +++ b/ldpd/ldp_vty_conf.c @@ -89,6 +89,9 @@ struct cmd_node ldp_pseudowire_node = int ldp_get_address(const char *str, int *af, union ldpd_addr *addr) { + if (!str || !af || !addr) + return (-1); + memset(addr, 0, sizeof(*addr)); if (inet_pton(AF_INET, str, &addr->v4) == 1) { -- 2.39.5