diff options
author | 2001-05-07 22:54:53 +0000 | |
---|---|---|
committer | 2001-05-07 22:54:53 +0000 | |
commit | e87999566687846f3702e9cd5a7a53f4ac6b6ff5 (patch) | |
tree | d8c4922211fe6b6afed783434cbd865d82e46035 | |
parent | Check for failure now that uvm_vslock can return one. Before this, there was (diff) | |
download | wireguard-openbsd-e87999566687846f3702e9cd5a7a53f4ac6b6ff5.tar.xz wireguard-openbsd-e87999566687846f3702e9cd5a7a53f4ac6b6ff5.zip |
Even though str_concati is supposed to handle intervals, it was still
assuming '\0' at the end.
-> importance of proper make bug reports, this was first diagnosed as
a for loop issue...
-rw-r--r-- | usr.bin/make/str.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/make/str.c b/usr.bin/make/str.c index d51f0cc6e29..bd01d0c4466 100644 --- a/usr.bin/make/str.c +++ b/usr.bin/make/str.c @@ -1,5 +1,5 @@ /* $OpenPackages$ */ -/* $OpenBSD: str.c,v 1.17 2001/05/03 13:41:11 espie Exp $ */ +/* $OpenBSD: str.c,v 1.18 2001/05/07 22:54:53 espie Exp $ */ /* $NetBSD: str.c,v 1.13 1996/11/06 17:59:23 christos Exp $ */ /*- @@ -47,7 +47,7 @@ static char sccsid[] = "@(#)str.c 5.8 (Berkeley) 6/1/90"; #else UNUSED -static char rcsid[] = "$OpenBSD: str.c,v 1.17 2001/05/03 13:41:11 espie Exp $"; +static char rcsid[] = "$OpenBSD: str.c,v 1.18 2001/05/07 22:54:53 espie Exp $"; #endif #endif /* not lint */ @@ -83,7 +83,8 @@ str_concati(s1, s2, e2, sep) result[len1-1] = sep; /* copy second string plus EOS into place */ - memcpy(result + len1, s2, len2 + 1); + memcpy(result + len1, s2, len2); + result[len1+len2] = '\0'; return result; } |