diff options
| author | Takashi Iwai <tiwai@suse.de> | 2025-07-10 12:06:26 +0200 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2025-07-11 09:53:17 +0200 |
| commit | 3edc76a671f761f6797e55cab88157f43256dedd (patch) | |
| tree | c61b4ee0c01aff737befaa8cd3da590be79b2e86 | |
| parent | 1d68ba24a79c2dce7cdb4bfbc6fdd8e0b2e69b85 (diff) | |
| download | linux-3edc76a671f761f6797e55cab88157f43256dedd.tar.gz linux-3edc76a671f761f6797e55cab88157f43256dedd.zip | |
ALSA: ali5451: 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-45-tiwai@suse.de
| -rw-r--r-- | sound/pci/ali5451/ali5451.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/pci/ali5451/ali5451.c b/sound/pci/ali5451/ali5451.c index 69c02bdd38ce..a6e499e0ceda 100644 --- a/sound/pci/ali5451/ali5451.c +++ b/sound/pci/ali5451/ali5451.c @@ -1645,7 +1645,7 @@ static int snd_ali_pcm(struct snd_ali *codec, int device, pcm->info_flags = 0; pcm->dev_class = desc->class; pcm->dev_subclass = SNDRV_PCM_SUBCLASS_GENERIC_MIX; - strcpy(pcm->name, desc->name); + strscpy(pcm->name, desc->name); codec->pcm[0] = pcm; return 0; } @@ -2133,8 +2133,8 @@ static int __snd_ali_probe(struct pci_dev *pci, snd_ali_proc_init(codec); - strcpy(card->driver, "ALI5451"); - strcpy(card->shortname, "ALI 5451"); + strscpy(card->driver, "ALI5451"); + strscpy(card->shortname, "ALI 5451"); sprintf(card->longname, "%s at 0x%lx, irq %i", card->shortname, codec->port, codec->irq); |
