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:
c9b7c4b
)
ALSA: ad1889: Use safer strscpy() instead of strcpy()
author
Takashi Iwai
<tiwai@suse.de>
Thu, 10 Jul 2025 10:06:24 +0000
(12:06 +0200)
committer
Takashi Iwai
<tiwai@suse.de>
Fri, 11 Jul 2025 07:53:17 +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-43-tiwai@suse.de
sound/pci/ad1889.c
patch
|
blob
|
blame
|
history
diff --git
a/sound/pci/ad1889.c
b/sound/pci/ad1889.c
index ac27a93ce4ff1f7fa81380983fccec1f49665171..020cbb467e7e68a0a74999b72607ed2d582ea3f8 100644
(file)
--- a/
sound/pci/ad1889.c
+++ b/
sound/pci/ad1889.c
@@
-605,7
+605,7
@@
snd_ad1889_pcm_init(struct snd_ad1889 *chip, int device)
pcm->private_data = chip;
pcm->info_flags = 0;
- strcpy(pcm->name, chip->card->shortname);
+ str
s
cpy(pcm->name, chip->card->shortname);
chip->pcm = pcm;
chip->psubs = NULL;
@@
-866,8
+866,8
@@
__snd_ad1889_probe(struct pci_dev *pci,
return err;
chip = card->private_data;
- strcpy(card->driver, "AD1889");
- strcpy(card->shortname, "Analog Devices AD1889");
+ str
s
cpy(card->driver, "AD1889");
+ str
s
cpy(card->shortname, "Analog Devices AD1889");
/* (3) */
err = snd_ad1889_create(card, pci);