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:
ea9deed
)
ALSA: echoaudio: Use safer strscpy() instead of strcpy()
author
Takashi Iwai
<tiwai@suse.de>
Thu, 10 Jul 2025 10:06:42 +0000
(12:06 +0200)
committer
Takashi Iwai
<tiwai@suse.de>
Fri, 11 Jul 2025 07:53:19 +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-61-tiwai@suse.de
sound/pci/echoaudio/midi.c
patch
|
blob
|
blame
|
history
diff --git
a/sound/pci/echoaudio/midi.c
b/sound/pci/echoaudio/midi.c
index c3f3c912956196569f7918b57d20aa18c2091ad8..4ee230794b4eedc386dcf87ef3ed68292fd67b18 100644
(file)
--- a/
sound/pci/echoaudio/midi.c
+++ b/
sound/pci/echoaudio/midi.c
@@
-311,7
+311,7
@@
static int snd_echo_midi_create(struct snd_card *card,
if (err < 0)
return err;
- strcpy(chip->rmidi->name, card->shortname);
+ str
s
cpy(chip->rmidi->name, card->shortname);
chip->rmidi->private_data = chip;
snd_rawmidi_set_ops(chip->rmidi, SNDRV_RAWMIDI_STREAM_INPUT,