pulse-server: improve module argument parsing

ticks also delimit strings.
Unescape values.

Fixes #1173
This commit is contained in:
Wim Taymans 2021-05-12 17:44:57 +02:00
parent 3ae2b9e189
commit ab9023f752

View file

@ -127,15 +127,19 @@ void module_args_add_props(struct pw_properties *props, const char *str)
if (*p == '\"') { if (*p == '\"') {
p++; p++;
f = '\"'; f = '\"';
} else if (*p == '\'') {
p++;
f = '\'';
} else { } else {
f = ' '; f = ' ';
} }
v = p; v = p;
e = strchr(p, f); for (e = p; *e ; e++) {
if (e == NULL) if (*e == f)
e = strchr(p, '\0'); break;
if (e == NULL) if (*e == '\\')
break; e++;
}
p = e; p = e;
if (*e != '\0') if (*e != '\0')
p++; p++;