projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
21484e4
)
ALSA: seq: ump: Fix -Wformat-truncation warning
author
Takashi Iwai
<tiwai@suse.de>
Fri, 15 Sep 2023 08:27:50 +0000
(10:27 +0200)
committer
Takashi Iwai
<tiwai@suse.de>
Fri, 15 Sep 2023 11:21:29 +0000
(13:21 +0200)
The filling of a port name string got a warning with W=1 due to the
potentially too long group name. Add the string precision to limit
the size.
Fixes: 81fd444aa371 ("ALSA: seq: Bind UMP device")
Link:
https://lore.kernel.org/r/20230915082802.28684-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/seq/seq_ump_client.c
patch
|
blob
|
history
diff --git
a/sound/core/seq/seq_ump_client.c
b/sound/core/seq/seq_ump_client.c
index a60e3f069a80fd43b7d83c0a34be636adf157262..2db371d79930d0f2af7630f50901a3d69006e538 100644
(file)
--- a/
sound/core/seq/seq_ump_client.c
+++ b/
sound/core/seq/seq_ump_client.c
@@
-207,7
+207,7
@@
static void fill_port_info(struct snd_seq_port_info *port,
SNDRV_SEQ_PORT_TYPE_PORT;
port->midi_channels = 16;
if (*group->name)
- snprintf(port->name, sizeof(port->name), "Group %d (%s)",
+ snprintf(port->name, sizeof(port->name), "Group %d (%
.53
s)",
group->group + 1, group->name);
else
sprintf(port->name, "Group %d", group->group + 1);