diff options
author | Quentin Young <qlyoung@users.noreply.github.com> | 2018-06-21 21:00:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-21 21:00:12 +0200 |
commit | 390cc01007d8e829a927cb11b15011c3151e1054 (patch) | |
tree | 1dbc9bb4847d990e012b78cb9f9e18dc0c042362 /lib | |
parent | Merge pull request #2408 from ajones-rvbd/ajones-issue-2403 (diff) | |
parent | ldpd lib: null check (Coverity 1452287 + 20 alike) (diff) | |
download | frr-390cc01007d8e829a927cb11b15011c3151e1054.tar.xz frr-390cc01007d8e829a927cb11b15011c3151e1054.zip |
Merge pull request #2511 from pacovn/Coverity_1452287_et_al_Explicit_null_dereferenced
ldpd, lib: null check (Coverity 1452287 and 20 alike)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/plist.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/plist.c b/lib/plist.c index 5ed1589f4..056b737f5 100644 --- a/lib/plist.c +++ b/lib/plist.c @@ -850,6 +850,11 @@ static int vty_prefix_list_install(struct vty *vty, afi_t afi, const char *name, int lenum = 0; int genum = 0; + if (name == NULL || prefix == NULL || typestr == NULL) { + vty_out(vty, "%% Missing prefix or type\n"); + return CMD_WARNING_CONFIG_FAILED; + } + /* Sequential number. */ if (seq) seqnum = (int64_t)atol(seq); |