patch-1.3.18 linux/lib/string.c

Next file: linux/net/Changes
Previous file: linux/kernel/sys.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.17/linux/lib/string.c linux/lib/string.c
@@ -62,8 +62,10 @@
 		while (*dest)
 			dest++;
 		while ((*dest++ = *src++)) {
-			if (--count == 0)
+			if (--count == 0) {
+				*dest = '\0';
 				break;
+			}
 		}
 	}
 

FUNET's LINUX-ADM group, [email protected]
TCL-scripts by Sam Shen, [email protected] with Sam's (original) version
of this