diff options
| author | Abdul Rahim <[email protected]> | 2024-09-14 23:17:49 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2024-10-04 13:12:30 +0000 |
| commit | 86ebc1fe902fd0d2cc37b8c9537a6f7eafc53f40 (patch) | |
| tree | 0c0b1891cdd2771ebd96ceaa6255bb334652941b /drivers/usb/cdns3/cdns3-starfive.c | |
| parent | usb: typec: stusb160x: Make use of i2c_get_match_data() (diff) | |
| download | kernel-86ebc1fe902fd0d2cc37b8c9537a6f7eafc53f40.tar.gz kernel-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 <[email protected]>
Reviewed-by: Kees Cook <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-starfive.c')
0 files changed, 0 insertions, 0 deletions
