mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-02 06:46:36 -04:00
Merge branch 'fix-conf-branch' into 'master'
conf: clamp pw_strv_insert_at invalid pos to [0, len] See merge request pipewire/pipewire!2800
This commit is contained in:
commit
e22cd8766c
1 changed files with 1 additions and 1 deletions
|
|
@ -919,7 +919,7 @@ static char **pw_strv_insert_at(char **strv, int len, int pos, const char *str)
|
||||||
len++;
|
len++;
|
||||||
}
|
}
|
||||||
if (pos < 0 || pos > len)
|
if (pos < 0 || pos > len)
|
||||||
pos = len+1;
|
pos = len;
|
||||||
|
|
||||||
n = realloc(strv, sizeof(char*) * (len + 2));
|
n = realloc(strv, sizeof(char*) * (len + 2));
|
||||||
if (n == NULL) {
|
if (n == NULL) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue