Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ALSA: control: 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-2-tiwai@suse.de

+1 -1
+1 -1
sound/core/control.c
··· 1435 1435 names = ue->priv_data; 1436 1436 for (; item > 0; --item) 1437 1437 names += strlen(names) + 1; 1438 - strcpy(uinfo->value.enumerated.name, names); 1438 + strscpy(uinfo->value.enumerated.name, names); 1439 1439 1440 1440 return 0; 1441 1441 }