summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2013-03-28 03:39:23 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2013-03-28 03:39:23 +0000
commitcf23d68dc21004a503a6c5eaf70cb5f61fbed2cb (patch)
tree5a3f44ddcd359b497aebfc0c37375b73e9e0213e /sys
parent9897533e96de03c7be86f216e0a8a630a80a0c7b (diff)
do not copy additional kernel memory into the swapent.se_path[]
ok tedu
Diffstat (limited to 'sys')
-rw-r--r--sys/uvm/uvm_swap.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/uvm/uvm_swap.c b/sys/uvm/uvm_swap.c
index 2cd7659de9c..3252c479a72 100644
--- a/sys/uvm/uvm_swap.c
+++ b/sys/uvm/uvm_swap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_swap.c,v 1.110 2012/09/20 20:20:11 miod Exp $ */
+/* $OpenBSD: uvm_swap.c,v 1.111 2013/03/28 03:39:22 deraadt Exp $ */
/* $NetBSD: uvm_swap.c,v 1.40 2000/11/17 11:39:39 mrg Exp $ */
/*
@@ -688,8 +688,9 @@ sys_swapctl(struct proc *p, void *v, register_t *retval)
/* now copy out the path if necessary */
if (error == 0)
- error = copyout(sdp->swd_path,
- &sep->se_path, sdp->swd_pathlen);
+ error = copyoutstr(sdp->swd_path,
+ sep->se_path, sizeof(sep->se_path),
+ NULL);
if (error)
goto out;