Public bug reported:
This was flagged in the MIR[1] review for frr.
There is an incorrect strncmp() usage in the code that was flagged by
gcc:
bgpd/bgp_community_alias.c: In function ‘bgp_ca_alias_hash_cmp’:
bgpd/bgp_community_alias.c:60:17: warning: ‘strncmp’ specified bound 8228
exceeds source size 8192 [-Wstringop-overread]
60 | return (strncmp(ca1->alias, ca2->alias, sizeof(struct community_alias))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bgpd/bgp_community_alias.c: In function ‘bgp_ca_community_hash_cmp’:
bgpd/bgp_community_alias.c:43:17: warning: ‘strncmp’ specified bound 8228
exceeds source size 36 [-Wstringop-overread]
43 | return (strncmp(ca1->community, ca2->community,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
44 | sizeof(struct community_alias))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I filed an upstream bug[2], and it was fixed[3].
1. https://bugs.launchpad.net/ubuntu/+source/frr/+bug/1951834
2. https://github.com/FRRouting/frr/issues/10484
3. https://github.com/FRRouting/frr/pull/10485
** Affects: frr (Ubuntu)
Importance: Undecided
Assignee: Andreas Hasenack (ahasenack)
Status: In Progress
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1959896
Title:
Resolve strncmp warnings
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/frr/+bug/1959896/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs