summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2003-05-12 18:54:30 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2003-05-12 18:54:30 +0000
commit750527497796376e6658eefa9429f0127dcddcc0 (patch)
treebaafec98954eb92db8fddaa79886973342894281
parentdcad8f65b452699d6c3e2e8873c667daf96686f2 (diff)
strlcpy; tedu ok
-rw-r--r--sys/compat/common/kern_info_43.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/compat/common/kern_info_43.c b/sys/compat/common/kern_info_43.c
index ed6928800b2..872aa2e043d 100644
--- a/sys/compat/common/kern_info_43.c
+++ b/sys/compat/common/kern_info_43.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_info_43.c,v 1.12 2002/03/14 20:31:31 mickey Exp $ */
+/* $OpenBSD: kern_info_43.c,v 1.13 2003/05/12 18:54:29 deraadt Exp $ */
/* $NetBSD: kern_info_43.c,v 1.5 1996/02/04 02:02:22 christos Exp $ */
/*
@@ -278,17 +278,17 @@ compat_43_sys_getkerninfo(p, v, retval)
bsdi_si.bsdi_ostype = ((char *)(s - bsdi_strings)) +
sizeof(bsdi_si);
- strcpy(s, ostype);
+ strlcpy(s, ostype, bsdi_strings + sizeof bsdi_strings - s);
s += strlen(s) + 1;
bsdi_si.bsdi_osrelease = ((char *)(s - bsdi_strings)) +
sizeof(bsdi_si);
- strcpy(s, osrelease);
+ strlcpy(s, osrelease, bsdi_strings + sizeof bsdi_strings - s);
s += strlen(s) + 1;
bsdi_si.bsdi_machine = ((char *)(s - bsdi_strings)) +
sizeof(bsdi_si);
- strcpy(s, machine);
+ strlcpy(s, machine, bsdi_strings + sizeof bsdi_strings - s);
s += strlen(s) + 1;
needed = sizeof(bsdi_si) + (s - bsdi_strings);