projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3829d81
)
ALSA: control: Use safer strscpy() instead of strcpy()
author
Takashi Iwai
<tiwai@suse.de>
Thu, 10 Jul 2025 10:05:43 +0000
(12:05 +0200)
committer
Takashi Iwai
<tiwai@suse.de>
Fri, 11 Jul 2025 07:51:08 +0000
(09:51 +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-2-tiwai@suse.de
sound/core/control.c
patch
|
blob
|
blame
|
history
diff --git
a/sound/core/control.c
b/sound/core/control.c
index 11f660fc6f2b583022dfd93bc84e40ac12498e08..9c3fd5113a61737bf30bb9a174a0d148e23a3787 100644
(file)
--- a/
sound/core/control.c
+++ b/
sound/core/control.c
@@
-1435,7
+1435,7
@@
static int snd_ctl_elem_user_enum_info(struct snd_kcontrol *kcontrol,
names = ue->priv_data;
for (; item > 0; --item)
names += strlen(names) + 1;
- strcpy(uinfo->value.enumerated.name, names);
+ str
s
cpy(uinfo->value.enumerated.name, names);
return 0;
}