diff options
| author | Takashi Iwai <tiwai@suse.de> | 2025-07-10 12:06:55 +0200 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2025-07-11 09:53:21 +0200 |
| commit | ed04b49e21f05b0f84bbaa86a59abd3ef64de946 (patch) | |
| tree | 7d1c71bafcf3864f47e8c11cee893789d03d0dc1 | |
| parent | c1b4f94c7645c58111cf53eb5165ab5fc65ec67d (diff) | |
| download | linux-ed04b49e21f05b0f84bbaa86a59abd3ef64de946.tar.gz linux-ed04b49e21f05b0f84bbaa86a59abd3ef64de946.zip | |
ALSA: mixart: 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-74-tiwai@suse.de
| -rw-r--r-- | sound/pci/mixart/mixart.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/pci/mixart/mixart.c b/sound/pci/mixart/mixart.c index 7ceaf6a7a77e..cdc0ba5dd1ad 100644 --- a/sound/pci/mixart/mixart.c +++ b/sound/pci/mixart/mixart.c @@ -970,7 +970,7 @@ static int snd_mixart_pcm_analog(struct snd_mixart *chip) pcm->info_flags = 0; pcm->nonatomic = true; - strcpy(pcm->name, name); + strscpy(pcm->name, name); preallocate_buffers(chip, pcm); @@ -1004,7 +1004,7 @@ static int snd_mixart_pcm_digital(struct snd_mixart *chip) pcm->info_flags = 0; pcm->nonatomic = true; - strcpy(pcm->name, name); + strscpy(pcm->name, name); preallocate_buffers(chip, pcm); @@ -1330,7 +1330,7 @@ static int snd_mixart_probe(struct pci_dev *pci, return err; } - strcpy(card->driver, CARD_NAME); + strscpy(card->driver, CARD_NAME); snprintf(card->shortname, sizeof(card->shortname), "Digigram miXart [PCM #%d]", i); snprintf(card->longname, sizeof(card->longname), |
