* [PATCH] ALSA: ump: Use safe_append_string() in snd_ump_update_group_attrs()
@ 2026-10-22 8:22 Thorsten Blum
0 siblings, 0 replies; only message in thread
From: Thorsten Blum @ 2026-10-22 8:22 UTC (permalink / raw)
To: Jaroslav Kysela, Takashi Iwai, Baul Lee, Qingyu Zhang
Cc: Thorsten Blum, Takashi Iwai, linux-sound, linux-kernel
To prepare for removing strlcat() from the kernel [1], use the existing
safe_append_string() helper to append the group name separator.
No functional change.
Link: https://github.com/KSPP/linux/issues/370 [1]
Signed-off-by: Thorsten Blum <blum@kernel.org>
---
sound/core/ump.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sound/core/ump.c b/sound/core/ump.c
index 3d1a2ed3b476..18780dece1a8 100644
--- a/sound/core/ump.c
+++ b/sound/core/ump.c
@@ -559,6 +559,7 @@ static void snd_ump_proc_read(struct snd_info_entry *entry,
/* update dir_bits and active flag for all groups in the client */
void snd_ump_update_group_attrs(struct snd_ump_endpoint *ump)
{
+ static const char separator[] = ", ";
struct snd_ump_block *fb;
struct snd_ump_group *group;
int i;
@@ -598,7 +599,8 @@ void snd_ump_update_group_attrs(struct snd_ump_endpoint *ump)
if (!*fb->info.name)
continue;
if (*group->name)
- strlcat(group->name, ", ", sizeof(group->name));
+ safe_append_string(group->name, sizeof(group->name),
+ separator, sizeof(separator));
safe_append_string(group->name, sizeof(group->name),
fb->info.name, sizeof(fb->info.name));
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-22 8:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-22 8:22 [PATCH] ALSA: ump: Use safe_append_string() in snd_ump_update_group_attrs() Thorsten Blum
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®