Files
linux/drivers/net
Wang Xiayang 77aedeeaf9 can: sja1000: force the string buffer NULL-terminated
[ Upstream commit cd28aa2e05 ]

strncpy() does not ensure NULL-termination when the input string size
equals to the destination buffer size IFNAMSIZ. The output string
'name' is passed to dev_info which relies on NULL-termination.

Use strlcpy() instead.

This issue is identified by a Coccinelle script.

Signed-off-by: Wang Xiayang <xywang.sjtu@sjtu.edu.cn>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-15 14:20:40 +09:00
..
2016-06-15 22:06:06 -07:00
2023-05-15 14:01:41 +09:00
2016-05-09 00:00:28 -04:00
2018-03-22 09:17:57 +01:00