diff options
author | 2003-04-08 00:18:31 +0000 | |
---|---|---|
committer | 2003-04-08 00:18:31 +0000 | |
commit | 88ae9982365ac5facaeaf50d940575b8d40a16e7 (patch) | |
tree | aa35bd374687d33d7f38e421cb7f71322e337e22 | |
parent | string cleaning; ok tedu (diff) | |
download | wireguard-openbsd-88ae9982365ac5facaeaf50d940575b8d40a16e7.tar.xz wireguard-openbsd-88ae9982365ac5facaeaf50d940575b8d40a16e7.zip |
strcpy trashing, help from tedu; ok tedu
-rw-r--r-- | usr.bin/patch/pch.c | 6 | ||||
-rw-r--r-- | usr.bin/patch/util.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/patch/pch.c b/usr.bin/patch/pch.c index 4caf1dfc594..c0c01b8242a 100644 --- a/usr.bin/patch/pch.c +++ b/usr.bin/patch/pch.c @@ -1,7 +1,7 @@ -/* $OpenBSD: pch.c,v 1.12 2003/04/05 17:17:53 deraadt Exp $ */ +/* $OpenBSD: pch.c,v 1.13 2003/04/08 00:18:31 deraadt Exp $ */ #ifndef lint -static char rcsid[] = "$OpenBSD: pch.c,v 1.12 2003/04/05 17:17:53 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: pch.c,v 1.13 2003/04/08 00:18:31 deraadt Exp $"; #endif /* not lint */ #include "EXTERN.h" @@ -501,7 +501,7 @@ another_hunk() if (!*s) malformed (); if (strnEQ(s,"0,0",3)) - strcpy(s, s+2); + memmove(s, s+2, strlen(s+2)+1); p_first = (LINENUM) atol(s); while (isdigit(*s)) s++; if (*s == ',') { diff --git a/usr.bin/patch/util.c b/usr.bin/patch/util.c index 0a68f19deda..5cf7884909d 100644 --- a/usr.bin/patch/util.c +++ b/usr.bin/patch/util.c @@ -1,7 +1,7 @@ -/* $OpenBSD: util.c,v 1.10 2003/04/05 17:17:53 deraadt Exp $ */ +/* $OpenBSD: util.c,v 1.11 2003/04/08 00:18:31 deraadt Exp $ */ #ifndef lint -static char rcsid[] = "$OpenBSD: util.c,v 1.10 2003/04/05 17:17:53 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: util.c,v 1.11 2003/04/08 00:18:31 deraadt Exp $"; #endif /* not lint */ #include "EXTERN.h" @@ -82,7 +82,7 @@ char *from, *to; if (*s) *s = toupper(*s); else - strcpy(simplename, simplename+1); + memmove(simplename, simplename+1, strlen(simplename+1)+1); } while (unlink(bakname) >= 0) ; /* while() is for benefit of Eunice */ #ifdef DEBUGGING |