android_kernel_oneplus_msm8998/drivers/net/can/usb
Wang Xiayang 1f46dbe266 can: peak_usb: force the string buffer NULL-terminated
[ Upstream commit e787f19373b8a5fa24087800ed78314fd17b984a ]

strncpy() does not ensure NULL-termination when the input string size
equals to the destination buffer size IFNAMSIZ. The output string is
passed to dev_info() which relies on the 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>
2019-09-06 10:18:07 +02:00
..
peak_usb can: peak_usb: force the string buffer NULL-terminated 2019-09-06 10:18:07 +02:00
ems_usb.c can: ems_usb: Fix memory leak on ems_usb_disconnect() 2018-08-06 16:24:42 +02:00
esd_usb2.c can: esd_usb2: cancel urb on -EPIPE and -EPROTO 2017-12-16 10:33:47 +01:00
gs_usb.c can: gs_usb: fix return value of the "set_bittiming" callback 2018-01-17 09:35:24 +01:00
Kconfig
kvaser_usb.c can: kvaser_usb: Increase correct stats counter in kvaser_usb_rx_can_msg() 2018-05-16 10:06:51 +02:00
Makefile
usb_8dev.c can: usb_8dev: cancel urb on -EPIPE and -EPROTO 2017-12-16 10:33:48 +01:00