diff options
| author | Takashi Iwai <tiwai@suse.de> | 2025-07-10 12:06:05 +0200 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2025-07-11 09:53:14 +0200 |
| commit | 461cef4d7d0270b5d11c2738c3a0a4e099351718 (patch) | |
| tree | a20705daaba300993067bf9f3e513696a834e4f0 /sound/isa | |
| parent | 94d7b8beae3574fe7167b8e0f31d1d480442ccdf (diff) | |
ALSA: adlib: 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-24-tiwai@suse.de
Diffstat (limited to 'sound/isa')
| -rw-r--r-- | sound/isa/adlib.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/isa/adlib.c b/sound/isa/adlib.c index f079ba4ef1a0..03fb2bce9255 100644 --- a/sound/isa/adlib.c +++ b/sound/isa/adlib.c @@ -61,8 +61,8 @@ static int snd_adlib_probe(struct device *dev, unsigned int n) return -EBUSY; } - strcpy(card->driver, DEV_NAME); - strcpy(card->shortname, CRD_NAME); + strscpy(card->driver, DEV_NAME); + strscpy(card->shortname, CRD_NAME); sprintf(card->longname, CRD_NAME " at %#lx", port[n]); error = snd_opl3_create(card, port[n], port[n] + 2, OPL3_HW_AUTO, 1, &opl3); |
