mirror of
https://github.com/torvalds/linux.git
synced 2026-06-04 20:46:48 +02:00
ALSA: firewire: isight: 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> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Link: https://patch.msgid.link/20250710100727.22653-19-tiwai@suse.de
This commit is contained in:
parent
fcd7979273
commit
6e96433010
|
|
@ -455,7 +455,7 @@ static int isight_create_pcm(struct isight *isight)
|
|||
return err;
|
||||
pcm->private_data = isight;
|
||||
pcm->nonatomic = true;
|
||||
strcpy(pcm->name, "iSight");
|
||||
strscpy(pcm->name, "iSight");
|
||||
isight->pcm = pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream;
|
||||
isight->pcm->ops = &ops;
|
||||
snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_VMALLOC, NULL, 0, 0);
|
||||
|
|
@ -638,13 +638,13 @@ static int isight_probe(struct fw_unit *unit,
|
|||
|
||||
card->private_free = isight_card_free;
|
||||
|
||||
strcpy(card->driver, "iSight");
|
||||
strcpy(card->shortname, "Apple iSight");
|
||||
strscpy(card->driver, "iSight");
|
||||
strscpy(card->shortname, "Apple iSight");
|
||||
snprintf(card->longname, sizeof(card->longname),
|
||||
"Apple iSight (GUID %08x%08x) at %s, S%d",
|
||||
fw_dev->config_rom[3], fw_dev->config_rom[4],
|
||||
dev_name(&unit->device), 100 << fw_dev->max_speed);
|
||||
strcpy(card->mixername, "iSight");
|
||||
strscpy(card->mixername, "iSight");
|
||||
|
||||
err = isight_create_pcm(isight);
|
||||
if (err < 0)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user