summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2005-01-05 06:38:16 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2005-01-05 06:38:16 +0000
commit8302ee0061911464e16342624833feeab05021a1 (patch)
tree21684d459975fbf230a0c23a2caf9a80984a6d45
parentc45f3cfb5c5f87d991a0ce568247a4ebd9cd3c6f (diff)
copyoutstr doesn't work so well with the kernel addresses
-rw-r--r--sys/dev/vnd.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c
index 361c28131f6..8249c7352c4 100644
--- a/sys/dev/vnd.c
+++ b/sys/dev/vnd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vnd.c,v 1.52 2004/06/30 11:33:39 pedro Exp $ */
+/* $OpenBSD: vnd.c,v 1.53 2005/01/05 06:38:15 tedu Exp $ */
/* $NetBSD: vnd.c,v 1.26 1996/03/30 23:06:11 christos Exp $ */
/*
@@ -921,10 +921,8 @@ vndioctl(dev, cmd, addr, flag, p)
if (error)
return (error);
- if ((error = copyoutstr(vnd->sc_file, vnu->vnu_file,
- sizeof(vnu->vnu_file), NULL)))
- return (error);
-
+ strlcpy(vnu->vnu_file, vnd->sc_file,
+ sizeof(vnu->vnu_file));
vnu->vnu_dev = vattr.va_fsid;
vnu->vnu_ino = vattr.va_fileid;
} else {