Staging: brcm80211: make interface name buffer smaller
authorDan Carpenter <error27@gmail.com>
Sat, 9 Oct 2010 11:54:06 +0000 (13:54 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 9 Oct 2010 20:49:40 +0000 (13:49 -0700)
commitcbf6baac775f2e3fb61f88dcaa71e44fb34b6906
tree7566fba3d713c9525fb237b52fd7ea143ab440bf
parentcf10700bf8047f0668dd874b607f89516612e6c7
Staging: brcm80211: make interface name buffer smaller

In the original code the interface name was IFNAMSIZ + 1, but that
caused problems in dhd_ifname2idx() which does:
strncmp(dhd->iflist[i]->name, name, IFNAMSIZ)

The wl_event_msg_t struct can only store 16 character names as well.

And thirdly there is a potential buffer overflow in dhd_op_if() because
if->net->name is IFNAMSIZ and we do:
strcpy(ifp->net->name, ifp->name);

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/brcm80211/brcmfmac/dhd_linux.c