]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: Do not null-terminate the domainname when receiving FQDN capability 14923/head
authorDonatas Abraitis <donatas@opensourcerouting.org>
Fri, 1 Dec 2023 08:35:19 +0000 (10:35 +0200)
committerDonatas Abraitis <donatas@opensourcerouting.org>
Fri, 1 Dec 2023 08:35:19 +0000 (10:35 +0200)
This is already handled above, no need to do here, because we could have an
overrun situation where len > 64 and we do out-of-bound actions.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
bgpd/bgp_packet.c

index 5dc35157ebf621909587e18a936429f0a844347e..601dac7970c6b4d4505df42d5a3c108b838e3e3a 100644 (file)
@@ -3339,8 +3339,6 @@ static void bgp_dynamic_capability_fqdn(uint8_t *pnt, int action,
                data += len;
 
                if (len) {
-                       str[len] = '\0';
-
                        XFREE(MTYPE_BGP_PEER_HOST, peer->domainname);
 
                        peer->domainname = XSTRDUP(MTYPE_BGP_PEER_HOST, str);