mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-06-11 11:58:36 +02:00
util: fix possible return of unsanitized input in str_sanitize
Fixes: 71a2c5cae2 ("util: sanitize control characters in str_sanitize()")
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1493>
This commit is contained in:
parent
b577a77333
commit
a487280e09
1 changed files with 1 additions and 1 deletions
|
|
@ -572,7 +572,7 @@ str_sanitize(const char *str)
|
|||
}
|
||||
}
|
||||
if (!needs_sanitization)
|
||||
return strdup(str);
|
||||
return strndup(str, slen);
|
||||
|
||||
char *sanitized = zalloc(2 * slen + 1);
|
||||
const char *src = str;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue