summaryrefslogtreecommitdiff
path: root/lib/libc/stdio/mktemp.3
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/stdio/mktemp.3')
-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 10a79fb84d1..54c4e25eaf8 100644
--- a/lib/libc/stdio/mktemp.3
+++ b/lib/libc/stdio/mktemp.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: mktemp.3,v 1.25 2000/12/24 00:30:58 aaron Exp $
+.\" $OpenBSD: mktemp.3,v 1.26 2003/02/16 01:56:46 deraadt Exp $
.\"
.\" Copyright (c) 1989, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -218,7 +218,7 @@ For instance, code of this form:
char sfn[15] = "";
FILE *sfp;
-strcpy(sfn, "/tmp/ed.XXXXXX");
+strlcpy(sfn, "/tmp/ed.XXXXXX", sizeof sfn);
if (mktemp(sfn) == NULL || (sfp = fopen(sfn, "w+")) == NULL) {
fprintf(stderr, "%s: %s\en", sfn, strerror(errno));
return (NULL);