Merge "wil6210: protect against invalid length of tx management frame"

This commit is contained in:
Linux Build Service Account 2017-07-31 09:52:18 -07:00 committed by Gerrit - the friendly Code Review server
commit 03f28c162d

View file

@ -960,7 +960,7 @@ int wil_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
wil_hex_dump_misc("mgmt tx frame ", DUMP_PREFIX_OFFSET, 16, 1, buf,
len, true);
if (len < sizeof(struct ieee80211_mgmt))
if (len < sizeof(struct ieee80211_hdr_3addr))
return -EINVAL;
cmd = kmalloc(sizeof(*cmd) + len, GFP_KERNEL);