diff options
| author | Takashi Iwai <tiwai@suse.de> | 2025-07-10 12:06:27 +0200 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2025-07-11 09:53:17 +0200 |
| commit | 03b0a614e2292a4afcaf5d196752d02803e2e6ca (patch) | |
| tree | 1561e3dd17887c97083811db60060d5c8e054ddc | |
| parent | 3edc76a671f761f6797e55cab88157f43256dedd (diff) | |
| download | linux-03b0a614e2292a4afcaf5d196752d02803e2e6ca.tar.gz linux-03b0a614e2292a4afcaf5d196752d02803e2e6ca.zip | |
ALSA: als300: 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-46-tiwai@suse.de
| -rw-r--r-- | sound/pci/als300.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/pci/als300.c b/sound/pci/als300.c index 43f98719e61b..f9e8424dc77f 100644 --- a/sound/pci/als300.c +++ b/sound/pci/als300.c @@ -546,7 +546,7 @@ static int snd_als300_new_pcm(struct snd_als300 *chip) if (err < 0) return err; pcm->private_data = chip; - strcpy(pcm->name, "ALS300"); + strscpy(pcm->name, "ALS300"); chip->pcm = pcm; /* set operators */ @@ -705,7 +705,7 @@ static int snd_als300_probe(struct pci_dev *pci, if (err < 0) goto error; - strcpy(card->driver, "ALS300"); + strscpy(card->driver, "ALS300"); if (chip->chip_type == DEVICE_ALS300_PLUS) /* don't know much about ALS300+ yet * print revision number for now */ |
