diff options
author | Donatas Abraitis <donatas@opensourcerouting.org> | 2024-11-15 07:16:10 +0100 |
---|---|---|
committer | Donatas Abraitis <donatas@opensourcerouting.org> | 2024-11-15 07:16:10 +0100 |
commit | f765bc4144c0741b5427cc6f61af497170f28484 (patch) | |
tree | 0db557cc8b0f0080a468f50017422cd612a98a79 | |
parent | Revert "bgpd: Fix color extended community parsing" (diff) | |
download | frr-f765bc4144c0741b5427cc6f61af497170f28484.tar.xz frr-f765bc4144c0741b5427cc6f61af497170f28484.zip |
bgpd: Use tmp_as when parsing color extended community
as is not initialized and it's assigned only later.
CID: 1601739
Fixes: 937cf4d ("bgpd:support of color extended community color-only types")
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
-rw-r--r-- | bgpd/bgp_ecommunity.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bgpd/bgp_ecommunity.c b/bgpd/bgp_ecommunity.c index 065f4fef3..e794ccb30 100644 --- a/bgpd/bgp_ecommunity.c +++ b/bgpd/bgp_ecommunity.c @@ -766,7 +766,7 @@ static const char *ecommunity_gettoken(const char *str, void *eval_ptr, if (*endptr != '\0' || tmp_as > BGP_AS4_MAX || errno) goto error; - if (*token == ecommunity_token_color && as > 3) + if (*token == ecommunity_token_color && tmp_as > 3) goto error; as = (as_t)tmp_as; } |