]> git.baikalelectronics.ru Git - kernel.git/commit
atmel: using strlcpy() to avoid possible buffer overflows
authorYueHaibing <yuehaibing@huawei.com>
Sat, 30 Jun 2018 06:33:41 +0000 (14:33 +0800)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 4 Jul 2018 15:15:06 +0000 (18:15 +0300)
commit251414a10ce36177699abe4432038078238bb01b
tree28963ff600a1af119033feb95b510e7112145f5b
parent044c4a1183fe97b66fec3b67cd6198db72eb00c6
atmel: using strlcpy() to avoid possible buffer overflows

'firmware' is a module param which may been longer than firmware_id,
so using strlcpy() to guard against overflows. Also priv is allocated
with zeroed memory,no need to set firmware_id[0] to '\0'.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/atmel/atmel.c