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:
3edc76a
)
ALSA: als300: Use safer strscpy() instead of strcpy()
author
Takashi Iwai
<tiwai@suse.de>
Thu, 10 Jul 2025 10:06:27 +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-46-tiwai@suse.de
sound/pci/als300.c
patch
|
blob
|
blame
|
history
diff --git
a/sound/pci/als300.c
b/sound/pci/als300.c
index 43f98719e61b721dd5718a38c778af292e8d6354..f9e8424dc77f87742dae47f7da042239a700cd05 100644
(file)
--- a/
sound/pci/als300.c
+++ b/
sound/pci/als300.c
@@
-546,7
+546,7
@@
static int snd_als300_new_pcm(struct snd_als300 *chip)
if (err < 0)
return err;
pcm->private_data = chip;
- strcpy(pcm->name, "ALS300");
+ str
s
cpy(pcm->name, "ALS300");
chip->pcm = pcm;
/* set operators */
@@
-705,7
+705,7
@@
static int snd_als300_probe(struct pci_dev *pci,
if (err < 0)
goto error;
- strcpy(card->driver, "ALS300");
+ str
s
cpy(card->driver, "ALS300");
if (chip->chip_type == DEVICE_ALS300_PLUS)
/* don't know much about ALS300+ yet
* print revision number for now */