Fix -Werror=array-bounds errors
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | rtnl: Fix netlink message alignmentsrc/ | +62 | 0 replies | |
| 2/2 | vpn-rtnl: Fix netlink message alignmentvpn/ | +62 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH v1 0/2] Fix -Werror=array-bounds errors
gcc complains with
src/rtnl.c: In function ‘send_getlink’:
src/rtnl.c:1485:12: error: array subscript ‘struct rtnl_request[0]’ is partly outside array bounds of ‘unsigned char[17]’ [-Werror=array-bounds]
1485 | req->hdr.nlmsg_len = RTNL_REQUEST_SIZE;
| ^~
The netlink helper 'struct rtnl_request' doesn't include any padding between header and message. This is wrong. Fix this by removing the helper structure and open code the message generation.
Daniel Wagner (2):
rtnl: Fix netlink message alignment
vpn-rtnl: Fix netlink message alignment
src/rtnl.c | 125 ++++++++++++++++++++++++------------------------- vpn/vpn-rtnl.c | 125 ++++++++++++++++++++++++------------------------- 2 files changed, 124 insertions(+), 126 deletions(-)
Signature · 1 line
2.32.0