brcmfmac: Do not use strcpy and strcat
authorDaniel Kim <dekim@broadcom.com>
Wed, 30 Jul 2014 11:20:00 +0000 (13:20 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 31 Jul 2014 17:41:44 +0000 (13:41 -0400)
commit46de06839b4936cc5fd4e6638b8fbf8437bce29e
tree108dc393091e191ce8828d228802255b982c149b
parent9f0b4cbdee09e635906611ed8dcc5c51116cbd75
brcmfmac: Do not use strcpy and strcat

Commit "c1b2053 brcmfmac: Make firmware path a module parameter"
introduced use of strcpy and strcat. The strcpy and strcat require
using null terminated strings and can cause out-of-bounds memory
access and subsequent corruption. This patch replaces these by
strncpy and strncat respectively to assure array boundaries are
not crossed.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Signed-off-by: Daniel Kim <dekim@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c