mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 16:44:58 +02:00
usb: musb: 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-3-aichao@kylinos.cn Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
c384f7ad44
commit
786bf7ef56
|
|
@ -1600,7 +1600,7 @@ static int musb_core_init(u16 musb_type, struct musb *musb)
|
|||
/* log core options (read using indexed model) */
|
||||
reg = musb_read_configdata(mbase);
|
||||
|
||||
strcpy(aInfo, (reg & MUSB_CONFIGDATA_UTMIDW) ? "UTMI-16" : "UTMI-8");
|
||||
strscpy(aInfo, (reg & MUSB_CONFIGDATA_UTMIDW) ? "UTMI-16" : "UTMI-8");
|
||||
if (reg & MUSB_CONFIGDATA_DYNFIFO) {
|
||||
strcat(aInfo, ", dyn FIFOs");
|
||||
musb->dyn_fifo = true;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user