mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-10-13 13:41:27 +00:00
libudev: accept NULL whitelist in util_replace_chars()
This commit is contained in:
@@ -398,7 +398,7 @@ int udev_util_replace_chars(char *str, const char *white)
|
||||
}
|
||||
|
||||
/* if space is allowed, replace whitespace with ordinary space */
|
||||
if (isspace(str[i]) && strchr(white, ' ') != NULL) {
|
||||
if (isspace(str[i]) && white != NULL && strchr(white, ' ') != NULL) {
|
||||
str[i] = ' ';
|
||||
i++;
|
||||
replaced++;
|
||||
|
||||
Reference in New Issue
Block a user