diff options
| author | David E. O'Brien <obrien@FreeBSD.org> | 2002-04-13 19:36:47 +0000 |
|---|---|---|
| committer | David E. O'Brien <obrien@FreeBSD.org> | 2002-04-13 19:36:47 +0000 |
| commit | ade4ded301002cd5bd4ff740b132d8dc14ffd0b2 (patch) | |
| tree | 509f9e0d0e55d98ce918a13da65c3665bb2c95fd /usr.bin/make | |
| parent | 80eef17ba950bdfcdd79e392ce4b73a83d7e91f1 (diff) | |
Notes
Diffstat (limited to 'usr.bin/make')
| -rw-r--r-- | usr.bin/make/str.c | 7 |
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) { |
