summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2000-11-22 18:13:24 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2000-11-22 18:13:24 +0000
commit6a1116eb9c8e87ab5e3b85557d32e63d593097b5 (patch)
tree4ffc4d6e96d24b6d94a704efad484858e131093a /lib
parenta27fd69a69d64736fd27f0b8521e3d17916c9b5f (diff)
use strlcpy in the example
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) {