bgpd: out-of-bounds access (Coverity 1399306)

Signed-off-by: F. Aragon <paco@voltanet.io>
This commit is contained in:
paco 2018-06-15 12:39:10 +02:00
parent e4a374681d
commit 5beb290a7b
No known key found for this signature in database
GPG Key ID: FD112A8C7E6A5E4A

View File

@ -662,7 +662,8 @@ static int rfapi_str2route_type(const char *l3str, const char *pstr, afi_t *afi,
vnc_import_bgp_exterior_redist_enable((bgp), (afi)); \
break; \
default: \
vnc_redistribute_set((bgp), (afi), (type)); \
if ((type) < ZEBRA_ROUTE_MAX) \
vnc_redistribute_set((bgp), (afi), (type)); \
break; \
} \
} while (0)
@ -677,7 +678,8 @@ static int rfapi_str2route_type(const char *l3str, const char *pstr, afi_t *afi,
vnc_import_bgp_exterior_redist_disable((bgp), (afi)); \
break; \
default: \
vnc_redistribute_unset((bgp), (afi), (type)); \
if ((type) < ZEBRA_ROUTE_MAX) \
vnc_redistribute_unset((bgp), (afi), (type)); \
break; \
} \
} while (0)