mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-05 13:21:22 +00:00
Merge pull request #2476 from pacovn/Coverity_1433544_Explicit_null_dereferenced
bgpd: null check (Coverity 1433544, 1433543, 1433542)
This commit is contained in:
commit
ed892e530d
@ -1733,7 +1733,8 @@ void rfapiPrintMatchingDescriptors(struct vty *vty, struct prefix *vn_prefix,
|
||||
int rfapiCliGetPrefixAddr(struct vty *vty, const char *str, struct prefix *p)
|
||||
{
|
||||
if (!str2prefix(str, p)) {
|
||||
vty_out(vty, "Malformed address \"%s\"%s", str, HVTYNL);
|
||||
vty_out(vty, "Malformed address \"%s\"%s", str ? str : "null",
|
||||
HVTYNL);
|
||||
return CMD_WARNING;
|
||||
}
|
||||
switch (p->family) {
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user