diff options
author | 2002-02-28 08:57:37 +0000 | |
---|---|---|
committer | 2002-02-28 08:57:37 +0000 | |
commit | f09d3110ecc10aadba0e61f0da5e3bf10ab821fe (patch) | |
tree | 1cb5d5ccf0aabe3de012f659b876fd38b664d316 | |
parent | strcpy() does not guarantee to handle overlapping copies, use memmove() instead. (diff) | |
download | wireguard-openbsd-f09d3110ecc10aadba0e61f0da5e3bf10ab821fe.tar.xz wireguard-openbsd-f09d3110ecc10aadba0e61f0da5e3bf10ab821fe.zip |
Fix size parameter to memmove() (off by one) introduced in last commit.
Now I can sleep.
-rw-r--r-- | usr.bin/deroff/deroff.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/deroff/deroff.c b/usr.bin/deroff/deroff.c index 009f09b53de..47a64f4b440 100644 --- a/usr.bin/deroff/deroff.c +++ b/usr.bin/deroff/deroff.c @@ -1,4 +1,4 @@ -/* $OpenBSD: deroff.c,v 1.2 2002/02/28 07:20:21 millert Exp $ */ +/* $OpenBSD: deroff.c,v 1.3 2002/02/28 08:57:37 millert Exp $ */ /*- * Copyright (c) 1988, 1993 @@ -76,7 +76,7 @@ static const char copyright[] = #if 0 static const char sccsid[] = "@(#)deroff.c 8.1 (Berkeley) 6/6/93"; #else -static const char rcsid[] = "$OpenBSD: deroff.c,v 1.2 2002/02/28 07:20:21 millert Exp $"; +static const char rcsid[] = "$OpenBSD: deroff.c,v 1.3 2002/02/28 08:57:37 millert Exp $"; #endif #endif /* not lint */ @@ -958,7 +958,7 @@ meputmac(char *cp, int constant) case '"': if (inquote && np[1] == '"') { - memmove(np, np + 1, strlen(np + 1)); + memmove(np, np + 1, strlen(np)); np++; continue; } else { |