summaryrefslogtreecommitdiffstats
path: root/sys/lib/libkern/strcpy.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2003-05-10 21:44:53 +0000
committerderaadt <deraadt@openbsd.org>2003-05-10 21:44:53 +0000
commit6930519451e987ff937f896a28eb3ba1f74d22bc (patch)
tree451a5c391376b149b2088f9e45bc46886a10b8ea /sys/lib/libkern/strcpy.c
parentuppercased .Dt sections. (diff)
downloadwireguard-openbsd-6930519451e987ff937f896a28eb3ba1f74d22bc.tar.xz
wireguard-openbsd-6930519451e987ff937f896a28eb3ba1f74d22bc.zip
warn for strcpy|strcat|sprintf|vsprintf; ok art dhartmei pval, and either henning or pb, i cannot tell which it was
Diffstat (limited to 'sys/lib/libkern/strcpy.c')
-rw-r--r--sys/lib/libkern/strcpy.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/lib/libkern/strcpy.c b/sys/lib/libkern/strcpy.c
index 7febef7de96..be82b0a1218 100644
--- a/sys/lib/libkern/strcpy.c
+++ b/sys/lib/libkern/strcpy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: strcpy.c,v 1.4 1998/06/27 01:21:07 mickey Exp $ */
+/* $OpenBSD: strcpy.c,v 1.5 2003/05/10 21:44:53 deraadt Exp $ */
/*
* Copyright (c) 1988 Regents of the University of California.
@@ -35,7 +35,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)strcpy.c 5.7 (Berkeley) 2/24/91";*/
-static char *rcsid = "$OpenBSD: strcpy.c,v 1.4 1998/06/27 01:21:07 mickey Exp $";
+static char *rcsid = "$OpenBSD: strcpy.c,v 1.5 2003/05/10 21:44:53 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#if !defined(_KERNEL) && !defined(_STANDALONE)
@@ -44,6 +44,8 @@ static char *rcsid = "$OpenBSD: strcpy.c,v 1.4 1998/06/27 01:21:07 mickey Exp $"
#include <lib/libkern/libkern.h>
#endif
+__warn_references(sprintf, "warning: strcpy() is often misused, please use strlcpy()");
+
char *
strcpy(to, from)
register char *to;