mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-11-01 09:13:37 +00:00
ALSA: pdaudiocf: 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-89-tiwai@suse.de
This commit is contained in:
parent
362c6bbe36
commit
a5546578af
2 changed files with 2 additions and 2 deletions
|
|
@ -160,7 +160,7 @@ static int snd_pdacf_assign_resources(struct snd_pdacf *pdacf, int port, int irq
|
|||
if (err < 0)
|
||||
return err;
|
||||
|
||||
strcpy(card->driver, "PDAudio-CF");
|
||||
strscpy(card->driver, "PDAudio-CF");
|
||||
sprintf(card->shortname, "Core Sound %s", card->driver);
|
||||
sprintf(card->longname, "%s at 0x%x, irq %i",
|
||||
card->shortname, port, irq);
|
||||
|
|
|
|||
|
|
@ -263,7 +263,7 @@ int snd_pdacf_pcm_new(struct snd_pdacf *chip)
|
|||
pcm->private_data = chip;
|
||||
pcm->info_flags = 0;
|
||||
pcm->nonatomic = true;
|
||||
strcpy(pcm->name, chip->card->shortname);
|
||||
strscpy(pcm->name, chip->card->shortname);
|
||||
chip->pcm = pcm;
|
||||
|
||||
err = snd_ak4117_build(chip->ak4117, pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue