mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 10:33:41 +02:00
ALSA: usx2y: 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: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20250710100727.22653-98-tiwai@suse.de
This commit is contained in:
parent
2d41b6f406
commit
f3d81c058f
|
|
@ -495,7 +495,7 @@ static int usx2y_create_card(struct usb_device *device,
|
|||
init_waitqueue_head(&US122L(card)->sk.sleep);
|
||||
US122L(card)->is_us144 = flags & US122L_FLAG_US144;
|
||||
INIT_LIST_HEAD(&US122L(card)->midi_list);
|
||||
strcpy(card->driver, "USB "NAME_ALLCAPS"");
|
||||
strscpy(card->driver, "USB "NAME_ALLCAPS"");
|
||||
sprintf(card->shortname, "TASCAM "NAME_ALLCAPS"");
|
||||
sprintf(card->longname, "%s (%x:%x if %d at %03d/%03d)",
|
||||
card->shortname,
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ static int snd_usx2y_hwdep_dsp_status(struct snd_hwdep *hw,
|
|||
}
|
||||
if (id < 0)
|
||||
return -ENODEV;
|
||||
strcpy(info->id, type_ids[id]);
|
||||
strscpy(info->id, type_ids[id]);
|
||||
info->num_dsps = 2; // 0: Prepad Data, 1: FPGA Code
|
||||
if (us428->chip_status & USX2Y_STAT_CHIP_INIT)
|
||||
info->chip_ready = 1;
|
||||
|
|
|
|||
|
|
@ -382,7 +382,7 @@ static int usx2y_create_card(struct usb_device *device,
|
|||
init_waitqueue_head(&usx2y(card)->us428ctls_wait_queue_head);
|
||||
mutex_init(&usx2y(card)->pcm_mutex);
|
||||
INIT_LIST_HEAD(&usx2y(card)->midi_list);
|
||||
strcpy(card->driver, "USB "NAME_ALLCAPS"");
|
||||
strscpy(card->driver, "USB "NAME_ALLCAPS"");
|
||||
sprintf(card->shortname, "TASCAM "NAME_ALLCAPS"");
|
||||
sprintf(card->longname, "%s (%x:%x if %d at %03d/%03d)",
|
||||
card->shortname,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user