From 15e6a825f2acf0ad032f2c166df9185909162870 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 1 Mar 2021 13:56:10 +0100 Subject: [PATCH] pulse-server: don't read past the end of the string --- src/modules/module-protocol-pulse/module.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/modules/module-protocol-pulse/module.c b/src/modules/module-protocol-pulse/module.c index 979561f8e..a33e8befc 100644 --- a/src/modules/module-protocol-pulse/module.c +++ b/src/modules/module-protocol-pulse/module.c @@ -132,14 +132,16 @@ static void add_props(struct pw_properties *props, const char *str) } else { f = ' '; } + v = p; e = strchr(p, f); if (e == NULL) e = strchr(p, '\0'); if (e == NULL) break; + p = e; + if (*e != '\0') + p++; *e = '\0'; - v = p; - p = e + 1; pw_properties_set(props, k, v); } free(s);