projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1c8e3eb
)
ALSA: pcxhr: Use safer strscpy() instead of strcpy()
author
Takashi Iwai
<tiwai@suse.de>
Thu, 10 Jul 2025 10:06:58 +0000
(12:06 +0200)
committer
Takashi Iwai
<tiwai@suse.de>
Fri, 11 Jul 2025 07:53:22 +0000
(09:53 +0200)
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-77-tiwai@suse.de
sound/pci/pcxhr/pcxhr.c
patch
|
blob
|
blame
|
history
diff --git
a/sound/pci/pcxhr/pcxhr.c
b/sound/pci/pcxhr/pcxhr.c
index 242bd7e04b3e174877857a5ba71a69b7fc0994aa..bfd84c50e98148077a353ec93a64bc111d6094a7 100644
(file)
--- a/
sound/pci/pcxhr/pcxhr.c
+++ b/
sound/pci/pcxhr/pcxhr.c
@@
-1149,7
+1149,7
@@
int pcxhr_create_pcm(struct snd_pcxhr *chip)
pcm->info_flags = 0;
pcm->nonatomic = true;
- strcpy(pcm->name, name);
+ str
s
cpy(pcm->name, name);
snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_DEV,
&chip->mgr->pci->dev,
@@
-1605,7
+1605,7
@@
static int pcxhr_probe(struct pci_dev *pci,
return err;
}
- strcpy(card->driver, DRIVER_NAME);
+ str
s
cpy(card->driver, DRIVER_NAME);
snprintf(card->shortname, sizeof(card->shortname),
"Digigram [PCM #%d]", i);
snprintf(card->longname, sizeof(card->longname),