From a76f10b544b4ffe4b0aaf41eede1aeb9b13a95e8 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Thu, 26 Feb 2009 11:57:01 +0000 Subject: Apply post-1.13.2 fixes, bump version to 1.13.3 --- util-linux/mdev.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'util-linux/mdev.c') diff --git a/util-linux/mdev.c b/util-linux/mdev.c index 34cabc9..d8b603e 100644 --- a/util-linux/mdev.c +++ b/util-linux/mdev.c @@ -179,8 +179,9 @@ static void make_device(char *path, int delete) unsigned i, n; #endif char *a = val; - s = strchr(val, ' '); - val = (s && s[1]) ? s+1 : NULL; + s = strchrnul(val, ' '); + val = (s[0] && s[1]) ? s+1 : NULL; + s[0] = '\0'; #if ENABLE_FEATURE_MDEV_RENAME_REGEXP /* substitute %1..9 with off[1..9], if any */ n = 0; -- cgit v1.1