brcmfmac: fix out of bound access on clearing wowl wake indicator
authorHante Meuleman <hante.meuleman@broadcom.com>
Mon, 19 Sep 2016 11:09:58 +0000 (12:09 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Mon, 26 Sep 2016 17:35:55 +0000 (20:35 +0300)
commita7ed7828ecda0c2b5e0d7f55dedd4230afd4b583
treec54fc83075e4fa6816d93487f5f705007c702598
parent2b7425f3629b38c438f890c20c5faeca64b144ff
brcmfmac: fix out of bound access on clearing wowl wake indicator

Clearing the wowl wakeindicator happens with a rather odd
construction where the string "clear" is used to set the iovar
wowl_wakeind. This was implemented incorrectly as it caused an
out of bound access. Use an intermediate variable of correct
length and copy string in that. Problem was found using coverity.

Reviewed-by: Arend Van Spriel <arend.vanspriel@broadcom.com>
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Signed-off-by: Hante Meuleman <hante.meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c