mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-03 06:47:04 -04:00
security: fix one-byte OOB read in module_args_add_props
A trailing backslash in a module argument string would cause the escape handling to advance past the null terminator, reading one byte out of bounds on the next loop iteration. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
c6faaff410
commit
6d2600c09d
1 changed files with 4 additions and 1 deletions
|
|
@ -147,8 +147,11 @@ void module_args_add_props(struct pw_properties *props, const char *str)
|
|||
for (e = p; *p ;) {
|
||||
if (*p == f)
|
||||
break;
|
||||
if (*p == '\\')
|
||||
if (*p == '\\') {
|
||||
p++;
|
||||
if (*p == '\0')
|
||||
break;
|
||||
}
|
||||
*e++ = *p++;
|
||||
}
|
||||
if (*p != '\0')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue