diff options
author | 2024-09-15 04:47:49 +0530 | |
---|---|---|
committer | 2024-10-04 15:12:30 +0200 | |
commit | 86ebc1fe902fd0d2cc37b8c9537a6f7eafc53f40 (patch) | |
tree | 0c0b1891cdd2771ebd96ceaa6255bb334652941b /drivers/usb/cdns3/cdns3-imx.c | |
parent | usb: typec: stusb160x: Make use of i2c_get_match_data() (diff) | |
download | wireguard-linux-86ebc1fe902fd0d2cc37b8c9537a6f7eafc53f40.tar.xz wireguard-linux-86ebc1fe902fd0d2cc37b8c9537a6f7eafc53f40.zip |
usb: gadget: f_midi: prefer strscpy() over strcpy()
The function strcpy() is depreciated and potentially unsafe. It performs
no bounds checking on the destination buffer. This could result in
linear overflows beyond the end of the buffer, leading to all kinds of
misbehaviors. The safe replacement is strscpy() [1].
this fixes checkpatch warning:
WARNING: Prefer strscpy over strcpy
Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strcpy [1]
Signed-off-by: Abdul Rahim <abdul.rahim@myyahoo.com>
Reviewed-by: Kees Cook <kees@kernel.org>
Link: https://lore.kernel.org/r/20240914231756.503521-1-abdul.rahim@myyahoo.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-imx.c')
0 files changed, 0 insertions, 0 deletions