Skip to content

Commit

Permalink
uwb: wrong sizeof argument in mac address compare
Browse files Browse the repository at this point in the history
In the __uwb_beca_find_bymac function the sizeof returns
the length of a pointer and not the data it is referring
to. Hence only the first 4 bytes were compared, not the
entire 6 bytes MAC address. Now the sizeof takes struct
uwb_mac_addr as argument.

Signed-off-by: Frank Leipold <frank.leipold@eads.net>
Signed-off-by: David Vrabel <david.vrabel@csr.com>
  • Loading branch information
Frank Leipold authored and David Vrabel committed Oct 20, 2008
1 parent 8092d7c commit c15895e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/uwb/beacon.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ struct uwb_beca_e *__uwb_beca_find_bymac(const struct uwb_mac_addr *mac_addr)
struct uwb_beca_e *bce, *next;
list_for_each_entry_safe(bce, next, &uwb_beca.list, node) {
if (!memcmp(bce->mac_addr, mac_addr->data,
sizeof(bce->mac_addr)))
sizeof(struct uwb_mac_addr)))
goto out;
}
bce = NULL;
Expand Down

0 comments on commit c15895e

Please sign in to comment.