Skip to content

Commit

Permalink
Merge pull request FRRouting#16280 from FRRouting/mergify/bp/stable/9…
Browse files Browse the repository at this point in the history
….1/pr-16211

bgpd: Check if we have really enough data before doing memcpy for software version (backport FRRouting#16211)
  • Loading branch information
Jafaral committed Jun 25, 2024
2 parents de0f0bd + 0cb316c commit 2187f54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bgpd/bgp_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -3068,7 +3068,7 @@ static void bgp_dynamic_capability_software_version(uint8_t *pnt, int action,
char soft_version[BGP_MAX_SOFT_VERSION + 1] = {};

if (action == CAPABILITY_ACTION_SET) {
if (data + len > end) {
if (data + len + 1 > end) {
zlog_err("%pBP: Received invalid Software Version capability length %d",
peer, len);
return;
Expand Down

0 comments on commit 2187f54

Please sign in to comment.