mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-27 07:15:33 +00:00
Merge pull request #16282 from FRRouting/mergify/bp/stable/10.0/pr-16213
bgpd: Check if we have really enough data before doing memcpy for FQDN capability (backport #16213)
This commit is contained in:
commit
bd137a2fb1
@ -3300,7 +3300,7 @@ static void bgp_dynamic_capability_fqdn(uint8_t *pnt, int action,
|
||||
}
|
||||
|
||||
len = *data;
|
||||
if (data + len > end) {
|
||||
if (data + len + 1 > end) {
|
||||
zlog_err("%pBP: Received invalid FQDN capability length (host name) %d",
|
||||
peer, hdr->length);
|
||||
return;
|
||||
@ -3331,7 +3331,7 @@ static void bgp_dynamic_capability_fqdn(uint8_t *pnt, int action,
|
||||
|
||||
/* domainname */
|
||||
len = *data;
|
||||
if (data + len > end) {
|
||||
if (data + len + 1 > end) {
|
||||
zlog_err("%pBP: Received invalid FQDN capability length (domain name) %d",
|
||||
peer, len);
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user