summaryrefslogtreecommitdiffstats
path: root/usr.bin/patch/util.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2003-04-08 00:18:31 +0000
committerderaadt <deraadt@openbsd.org>2003-04-08 00:18:31 +0000
commit88ae9982365ac5facaeaf50d940575b8d40a16e7 (patch)
treeaa35bd374687d33d7f38e421cb7f71322e337e22 /usr.bin/patch/util.c
parentstring cleaning; ok tedu (diff)
downloadwireguard-openbsd-88ae9982365ac5facaeaf50d940575b8d40a16e7.tar.xz
wireguard-openbsd-88ae9982365ac5facaeaf50d940575b8d40a16e7.zip
strcpy trashing, help from tedu; ok tedu
Diffstat (limited to 'usr.bin/patch/util.c')
-rw-r--r--usr.bin/patch/util.c6
1 files changed, 3 insertions, 3 deletions
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