diff options
author | paco <paco@voltanet.io> | 2018-06-25 16:47:15 +0200 |
---|---|---|
committer | paco <paco@voltanet.io> | 2018-06-25 16:47:15 +0200 |
commit | 0ef34ac51ad2d522daf18e5a2b6e1fa987cbb412 (patch) | |
tree | 380ca60c9993a9ba217cdb19a9510ba51e7fcf23 /ldpd/ldp_vty_conf.c | |
parent | Merge pull request #2520 from donaldsharp/privs_smivs (diff) | |
download | frr-0ef34ac51ad2d522daf18e5a2b6e1fa987cbb412.tar.xz frr-0ef34ac51ad2d522daf18e5a2b6e1fa987cbb412.zip |
ldpd: null check (Coverity 1452317)
Signed-off-by: F. Aragon <paco@voltanet.io>
Diffstat (limited to 'ldpd/ldp_vty_conf.c')
-rw-r--r-- | ldpd/ldp_vty_conf.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ldpd/ldp_vty_conf.c b/ldpd/ldp_vty_conf.c index e5832c508..4ef57f574 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) { |