]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ALSA: vxpocket: Use safer strscpy() instead of strcpy()
authorTakashi Iwai <tiwai@suse.de>
Thu, 10 Jul 2025 10:07:11 +0000 (12:07 +0200)
committerTakashi Iwai <tiwai@suse.de>
Fri, 11 Jul 2025 07:53:35 +0000 (09:53 +0200)
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-90-tiwai@suse.de
sound/pcmcia/vx/vxpocket.c

index d2d5f64d63b4313a9457182f96eafb2de4beaf48..2e09f2a513a6a07a4ae49e6fbdd733be0943cee6 100644 (file)
@@ -187,7 +187,7 @@ static int vxpocket_config(struct pcmcia_device *link)
                /* overwrite the hardware information */
                chip->hw = &vxp440_hw;
                chip->type = vxp440_hw.type;
-               strcpy(chip->card->driver, vxp440_hw.name);
+               strscpy(chip->card->driver, vxp440_hw.name);
        }
 
        ret = pcmcia_request_io(link);