diff options
| author | Takashi Iwai <tiwai@suse.de> | 2025-07-10 12:06:42 +0200 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2025-07-11 09:53:19 +0200 |
| commit | 7bab02a32c6ae08aeb60aa6f85363cd5847d0911 (patch) | |
| tree | 09693908b3386fabd309b332f835787bb4548733 | |
| parent | ea9deed52d7f196454456f775fddf53328e90f2a (diff) | |
| download | linux-7bab02a32c6ae08aeb60aa6f85363cd5847d0911.tar.gz linux-7bab02a32c6ae08aeb60aa6f85363cd5847d0911.zip | |
ALSA: echoaudio: 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>
Link: https://patch.msgid.link/20250710100727.22653-61-tiwai@suse.de
| -rw-r--r-- | sound/pci/echoaudio/midi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/pci/echoaudio/midi.c b/sound/pci/echoaudio/midi.c index c3f3c9129561..4ee230794b4e 100644 --- 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); + strscpy(chip->rmidi->name, card->shortname); chip->rmidi->private_data = chip; snd_rawmidi_set_ops(chip->rmidi, SNDRV_RAWMIDI_STREAM_INPUT, |
