From 9ec782630cc11376bdeca5d2d55aa7ddd589c85e Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Sun, 6 Feb 2022 18:34:35 +0100 Subject: [PATCH] module: fix argument parsing Skip spaces before the key. When the previous key ends with a ' or when there are 2 spaces between keys, the key includes the whitespace otherwise. See #2086 --- src/modules/module-protocol-pulse/module.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/modules/module-protocol-pulse/module.c b/src/modules/module-protocol-pulse/module.c index b07d36531..9f6002d0b 100644 --- a/src/modules/module-protocol-pulse/module.c +++ b/src/modules/module-protocol-pulse/module.c @@ -25,6 +25,7 @@ #include #include +#include #include #include @@ -143,6 +144,8 @@ void module_args_add_props(struct pw_properties *props, const char *str) const struct str_map *map; while (*p) { + while (*p && isspace(*p)) + p++; e = strchr(p, '='); if (e == NULL) break;