From 78da72ce30010d086990575556152612dc27f5cb Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 25 Mar 2021 17:02:10 +0100 Subject: [PATCH] pulse-server: take length of the right string We need to take the length of the desc, not name, to construct the extended 'Monitor of " string. --- src/modules/module-protocol-pulse/pulse-server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/module-protocol-pulse/pulse-server.c b/src/modules/module-protocol-pulse/pulse-server.c index 2e1e83ec4..f006db358 100644 --- a/src/modules/module-protocol-pulse/pulse-server.c +++ b/src/modules/module-protocol-pulse/pulse-server.c @@ -4182,7 +4182,7 @@ static int fill_source_info(struct client *client, struct message *m, snprintf(monitor_name, size, "%s.monitor", name); } if ((desc = spa_dict_lookup(info->props, PW_KEY_NODE_DESCRIPTION)) != NULL) { - size_t size = strlen(name) + 20; + size_t size = strlen(desc) + 20; monitor_desc = alloca(size); snprintf(monitor_desc, size, "Monitor of %s", desc); } else {