aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/make
diff options
context:
space:
mode:
authorDavid E. O'Brien <obrien@FreeBSD.org>2002-04-13 19:36:47 +0000
committerDavid E. O'Brien <obrien@FreeBSD.org>2002-04-13 19:36:47 +0000
commitade4ded301002cd5bd4ff740b132d8dc14ffd0b2 (patch)
tree509f9e0d0e55d98ce918a13da65c3665bb2c95fd /usr.bin/make
parent80eef17ba950bdfcdd79e392ce4b73a83d7e91f1 (diff)
Notes
Diffstat (limited to 'usr.bin/make')
-rw-r--r--usr.bin/make/str.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/make/str.c b/usr.bin/make/str.c
index 87557a8d19c0..03ff7a4a73a2 100644
--- a/usr.bin/make/str.c
+++ b/usr.bin/make/str.c
@@ -112,9 +112,12 @@ str_concat(s1, s2, flags)
result[len1++] = '/';
}
- /* copy second string plus EOS into place */
+ /* copy second string into place */
if (len2)
- memcpy(result + len1, s2, len2 + 1);
+ memcpy(result + len1, s2, len2);
+
+ /* Terminate. */
+ result[len1 + len2] = '\0';
/* free original strings */
if (flags & STR_DOFREE) {