diff options
author | cperciva <cperciva@FreeBSD.org> | 2005-05-06 02:50:00 +0000 |
---|---|---|
committer | cperciva <cperciva@FreeBSD.org> | 2005-05-06 02:50:00 +0000 |
commit | e513415af91332f009d9733c7156e1a4a60c244f (patch) | |
tree | b49c2e551390ab52afef3a68a53ec4b29faefa23 /sys/kern/subr_bus.c | |
parent | e4a28513e82eb23a2f1155a31e13cd9091ff21be (diff) | |
download | FreeBSD-src-e513415af91332f009d9733c7156e1a4a60c244f.zip FreeBSD-src-e513415af91332f009d9733c7156e1a4a60c244f.tar.gz |
If we are going to
1. Copy a NULL-terminated string into a fixed-length buffer, and
2. copyout that buffer to userland,
we really ought to
0. Zero the entire buffer
first.
Security: FreeBSD-SA-05:08.kmem
Diffstat (limited to 'sys/kern/subr_bus.c')
-rw-r--r-- | sys/kern/subr_bus.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index 531eaf9..3f2e477 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -3954,6 +3954,7 @@ sysctl_devices(SYSCTL_HANDLER_ARGS) /* * Populate the return array. */ + bzero(&udev, sizeof(udev)); udev.dv_handle = (uintptr_t)dev; udev.dv_parent = (uintptr_t)dev->parent; if (dev->nameunit == NULL) |