projects
/
openvswitch
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5f8e321
)
bridge: Ethernet address is 6 bytes, not 4 or 8.
author
Ben Pfaff
<blp@nicira.com>
Wed, 23 Feb 2011 19:21:52 +0000
(11:21 -0800)
committer
Ben Pfaff
<blp@nicira.com>
Wed, 23 Feb 2011 21:36:59 +0000
(13:36 -0800)
'ea' here is a function parameter declared as an array, so "sizeof ea" is
sizeof(uint8_t *), which is either 4 or 8.
Coverity #10689, 10735.
vswitchd/bridge.c
patch
|
blob
|
history
diff --git
a/vswitchd/bridge.c
b/vswitchd/bridge.c
index c2c4579c56fc292a8923e0d3abcc333608086163..a448e05c11349631b54fd5377baad730c05f60ef 100644
(file)
--- a/
vswitchd/bridge.c
+++ b/
vswitchd/bridge.c
@@
-981,7
+981,7
@@
bridge_pick_local_hw_addr(struct bridge *br, uint8_t ea[ETH_ADDR_LEN],
/* Otherwise choose the minimum non-local MAC address among all of the
* interfaces. */
- memset(ea, 0xff,
sizeof ea
);
+ memset(ea, 0xff,
ETH_ADDR_LEN
);
for (i = 0; i < br->n_ports; i++) {
struct port *port = br->ports[i];
uint8_t iface_ea[ETH_ADDR_LEN];