summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2003-10-01 08:03:02 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2003-10-01 08:03:02 +0000
commit0377589a11d03e61e9eca2b924477e7deeaa8653 (patch)
treeb6f1f5fbc945927c43818cdcb79de6612219e164 /sys
parent74c70da742dcb7a7a5cfc5b369dc07ecb2e38fa6 (diff)
out-of-bound memory access. deraadt ok
Diffstat (limited to 'sys')
-rw-r--r--sys/compat/ibcs2/ibcs2_stat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/compat/ibcs2/ibcs2_stat.c b/sys/compat/ibcs2/ibcs2_stat.c
index b4285a31b73..77b0a6839d3 100644
--- a/sys/compat/ibcs2/ibcs2_stat.c
+++ b/sys/compat/ibcs2/ibcs2_stat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ibcs2_stat.c,v 1.11 2002/08/23 15:39:31 art Exp $ */
+/* $OpenBSD: ibcs2_stat.c,v 1.12 2003/10/01 08:03:01 itojun Exp $ */
/* $NetBSD: ibcs2_stat.c,v 1.5 1996/05/03 17:05:32 christos Exp $ */
/*
@@ -270,7 +270,7 @@ ibcs2_sys_utssys(p, v, retval)
bcopy(hostname, sut.nodename, sizeof(sut.nodename));
sut.nodename[sizeof(sut.nodename)-1] = '\0';
bcopy(osrelease, sut.release, sizeof(sut.release) - 1);
- bcopy("1", sut.version, sizeof(sut.version) - 1);
+ strlcpy(sut.version, "1", sizeof(sut.version));
bcopy(machine, sut.machine, sizeof(sut.machine) - 1);
return copyout((caddr_t)&sut, (caddr_t)SCARG(uap, a1),