summaryrefslogtreecommitdiff
path: root/packages/busybox/busybox-1.13.2/r24785.patch
blob: e3e80befcd39cb2c969d2e5830cee525d9a057fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--- busybox/util-linux/mdev.c	2009/01/08 17:19:01	24725
+++ busybox/util-linux/mdev.c	2009/01/12 07:57:52	24785
@@ -179,8 +179,9 @@
 			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;