diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2008-11-20 02:43:34 +0100 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2008-11-20 02:43:34 +0100 |
commit | bbfaec2b2f43ddf7b8ef42a2a687f536ac445183 (patch) | |
tree | c8011ed017cc9764ad8524c51615c6cfbff46b99 /udev | |
parent | 24239ded2d7a152d1c428880ae2cf82d904a350d (diff) |
libudev: accept NULL whitelist in util_replace_chars()
Diffstat (limited to 'udev')
-rw-r--r-- | udev/lib/libudev-util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/udev/lib/libudev-util.c b/udev/lib/libudev-util.c index f4e78850f9..1cd18c8906 100644 --- a/udev/lib/libudev-util.c +++ b/udev/lib/libudev-util.c @@ -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++; |