diff options
| author | paco <paco@voltanet.io> | 2018-06-18 12:23:28 +0200 |
|---|---|---|
| committer | paco <paco@voltanet.io> | 2018-06-18 16:07:43 +0200 |
| commit | c37a11ad7206344de898f09a156ee6682499dde6 (patch) | |
| tree | 86204b2d7b35608368eb0f8308a734354bc7b6f7 /lib/prefix.c | |
| parent | 6389e663e9b8971d5afa75d6afa18f5152c6de1b (diff) | |
bgpd: null chk (Coverity 1433544 1433543 1433542)
Signed-off-by: F. Aragon <paco@voltanet.io>
Diffstat (limited to 'lib/prefix.c')
| -rw-r--r-- | lib/prefix.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/prefix.c b/lib/prefix.c index ed0774e774..b129665e7b 100644 --- a/lib/prefix.c +++ b/lib/prefix.c @@ -1197,6 +1197,9 @@ int str2prefix(const char *str, struct prefix *p) { int ret; + if (!str || !p) + return 0; + /* First we try to convert string to struct prefix_ipv4. */ ret = str2prefix_ipv4(str, (struct prefix_ipv4 *)p); if (ret) |
