diff options
| author | Takashi Iwai <tiwai@suse.de> | 2025-07-10 12:05:45 +0200 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2025-07-11 09:51:08 +0200 |
| commit | 7df6224dec68eaa266663206d899a77d7a947541 (patch) | |
| tree | 4776d84177dc4c69ced6c62ba2168fb76fc12053 /sound/core/seq/seq_midi.c | |
| parent | d8cd23a0d2da68650a0710908aeefbe8b799fec3 (diff) | |
| download | linux-next-7df6224dec68eaa266663206d899a77d7a947541.tar.gz linux-next-7df6224dec68eaa266663206d899a77d7a947541.zip | |
ALSA: seq: 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-4-tiwai@suse.de
Diffstat (limited to 'sound/core/seq/seq_midi.c')
| -rw-r--r-- | sound/core/seq/seq_midi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/core/seq/seq_midi.c b/sound/core/seq/seq_midi.c index ba52a77eda38..581e138a3115 100644 --- a/sound/core/seq/seq_midi.c +++ b/sound/core/seq/seq_midi.c @@ -344,7 +344,7 @@ snd_seq_midisynth_probe(struct device *_dev) info->stream = SNDRV_RAWMIDI_STREAM_INPUT; info->subdevice = p; if (snd_rawmidi_info_select(card, info) >= 0) - strcpy(port->name, info->subname); + strscpy(port->name, info->subname); if (! port->name[0]) { if (info->name[0]) { if (ports > 1) |
