wlcore: fix memset sizes in wl1271_cmd_build_arp_rsp()
PATCH 1/1 wlcore: fix memset sizes in wl1271_cmd_build_arp_rsp()
We were using the size of the pointer and not of the allocate structure itself in this function. Use the size of the structure instead.
Reported-by David Binderman <[email protected]>
Signed-off-by Luciano Coelho <[email protected]>
--- drivers/net/wireless/ti/wlcore/cmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/ti/wlcore/cmd.c +2 -2
@@ -1034,7 +1034,7 @@ int wl1271_cmd_build_arp_rsp(struct wl1271 *wl, struct wl12xx_vif *wlvif)skb_reserve (skb,sizeof (*hdr) +WL1271_EXTRA_SPACE_MAX ); tmpl = (struct wl12xx_arp_rsp_template *)skb_put (skb,sizeof (*tmpl)); -memset (tmpl,0 ,sizeof (tmpl)); +memset (tmpl,0 ,sizeof (*tmpl));/* llc layer */ memcpy (tmpl->llc_hdr, rfc1042_header,sizeof (rfc1042_header));
@@ -1083,7 +1083,7 @@ int wl1271_cmd_build_arp_rsp(struct wl1271 *wl, struct wl12xx_vif *wlvif)/* mac80211 header */ hdr = (struct ieee80211_hdr_3addr *)skb_push (skb,sizeof (*hdr)); -memset (hdr,0 ,sizeof (hdr)); +memset (hdr,0 ,sizeof (*hdr)); fc =IEEE80211_FTYPE_DATA |IEEE80211_FCTL_TODS ;if (wlvif->sta.qos) fc |=IEEE80211_STYPE_QOS_DATA ;
Signature · 1 line
1.7.10
Quoted 7 lines · Luciano Coelho
We were using the size of the pointer and not of the allocate structure itself in this function. Use the size of the structure instead.
Reported-by David Binderman <[email protected]>Signed-off-by Luciano Coelho <[email protected]>---
Oh, now I saw that Jesper had already sent a patch to fix this. I'll drop this one and use his patch instead.
Signature · 2 lines
Cheers, Luca.