mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 14:25:26 +00:00
netdev-linux: Fix ethtool_cmd is partly outside array bounds.
Used Ubuntu with gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0
lib/netdev-linux.c: In function 'netdev_linux_construct':
lib/netdev-linux.c:7003:15: error:
array subscript 'struct ethtool_cmd[0]' is partly outside array
bounds of ‘union <anonymous>[1]’ [-Werror=array-bounds]
7003 | ecmd->cmd = cmd;
| ~~~~~~~~~~^~~~~
lib/netdev-linux.c:2411:7: note: while referencing ‘sset_info’
2411 | } sset_info;
| ^~~~~~~~~
Fixes: 6c59c19526
("netdev-linux: Use ethtool to detect offload support.")
Signed-off-by: Roi Dayan <roid@nvidia.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
This commit is contained in:
@@ -2402,6 +2402,7 @@ static int
|
||||
netdev_linux_read_stringset_info(struct netdev_linux *netdev, uint32_t *len)
|
||||
{
|
||||
union {
|
||||
struct ethtool_cmd ecmd;
|
||||
struct ethtool_sset_info hdr;
|
||||
struct {
|
||||
uint64_t pad[2];
|
||||
|
Reference in New Issue
Block a user