mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
pulse-server: don't read past the end of the string
This commit is contained in:
parent
9662bc96ab
commit
15e6a825f2
1 changed files with 4 additions and 2 deletions
|
|
@ -132,14 +132,16 @@ static void add_props(struct pw_properties *props, const char *str)
|
||||||
} else {
|
} else {
|
||||||
f = ' ';
|
f = ' ';
|
||||||
}
|
}
|
||||||
|
v = p;
|
||||||
e = strchr(p, f);
|
e = strchr(p, f);
|
||||||
if (e == NULL)
|
if (e == NULL)
|
||||||
e = strchr(p, '\0');
|
e = strchr(p, '\0');
|
||||||
if (e == NULL)
|
if (e == NULL)
|
||||||
break;
|
break;
|
||||||
|
p = e;
|
||||||
|
if (*e != '\0')
|
||||||
|
p++;
|
||||||
*e = '\0';
|
*e = '\0';
|
||||||
v = p;
|
|
||||||
p = e + 1;
|
|
||||||
pw_properties_set(props, k, v);
|
pw_properties_set(props, k, v);
|
||||||
}
|
}
|
||||||
free(s);
|
free(s);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue