summaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorDenis Vlasenko2009-02-26 11:57:01 +0000
committerDenis Vlasenko2009-02-26 11:57:01 +0000
commita76f10b544b4ffe4b0aaf41eede1aeb9b13a95e8 (patch)
treea41295eaee4b3f28a6e20df4e592ffacc42ac4ab /util-linux
parent15c0b725849875c718b168a26e13872e163cde4c (diff)
downloadbusybox-a76f10b544b4ffe4b0aaf41eede1aeb9b13a95e8.zip
busybox-a76f10b544b4ffe4b0aaf41eede1aeb9b13a95e8.tar.gz
Apply post-1.13.2 fixes, bump version to 1.13.3
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/mdev.c5
1 files changed, 3 insertions, 2 deletions
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;