summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/stdio/mktemp.34
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/stdio/mktemp.3 b/lib/libc/stdio/mktemp.3
index d7b036e944e..11b64fe3526 100644
--- a/lib/libc/stdio/mktemp.3
+++ b/lib/libc/stdio/mktemp.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: mktemp.3,v 1.23 2000/09/11 01:30:49 aaron Exp $
+.\" $OpenBSD: mktemp.3,v 1.24 2000/11/22 18:13:23 deraadt Exp $
.\"
.\" Copyright (c) 1989, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -234,7 +234,7 @@ char sfn[15] = "";
FILE *sfp;
int fd = -1;
-strcpy(sfn, "/tmp/ed.XXXXXX");
+strlcpy(sfn, "/tmp/ed.XXXXXX", sizeof sfn);
if ((fd = mkstemp(sfn)) == -1 ||
(sfp = fdopen(fd, "w+")) == NULL) {
if (fd != -1) {