mirror of
https://github.com/systemd/systemd.git
synced 2026-07-23 07:50:41 +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