mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 23:22:31 +02:00
usb: gadget: udc: Use safer strscpy() instead of strcpy()
Use a safer function strscpy() instead of strcpy() for copying to arrays. Only idiomatic code replacement, and no functional changes. Signed-off-by: Ai Chao <aichao@kylinos.cn> Link: https://patch.msgid.link/20260310094434.3639602-6-aichao@kylinos.cn Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
2131540de4
commit
9b4051a47d
|
|
@ -3151,7 +3151,7 @@ int udc_probe(struct udc *dev)
|
|||
tmp, dev->phys_addr, dev->chiprev,
|
||||
(dev->chiprev == UDC_HSA0_REV) ?
|
||||
"A0" : "B1");
|
||||
strcpy(tmp, UDC_DRIVER_VERSION_STRING);
|
||||
strscpy(tmp, UDC_DRIVER_VERSION_STRING);
|
||||
if (dev->chiprev == UDC_HSA0_REV) {
|
||||
dev_err(dev->dev, "chip revision is A0; too old\n");
|
||||
retval = -ENODEV;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user