2011/6/6 Eric Blake <eblake@xxxxxxxxxx>: > Detected by Coverity. ÂAll existing callers happen to be in > range, so this isn't too serious. > > * src/qemu/qemu_cgroup.c (qemuCgroupControllerActive): Check > bounds before dereference. > --- > Âsrc/qemu/qemu_cgroup.c | Â Â4 ++-- > Â1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c > index eba1e73..1298924 100644 > --- a/src/qemu/qemu_cgroup.c > +++ b/src/qemu/qemu_cgroup.c > @@ -48,10 +48,10 @@ bool qemuCgroupControllerActive(struct qemud_driver *driver, > Â{ > Â Â if (driver->cgroup == NULL) > Â Â Â Â return false; > - Â Âif (!virCgroupMounted(driver->cgroup, controller)) > - Â Â Â Âreturn false; > Â Â if (controller < 0 || controller >= VIR_CGROUP_CONTROLLER_LAST) > Â Â Â Â return false; > + Â Âif (!virCgroupMounted(driver->cgroup, controller)) > + Â Â Â Âreturn false; > Â Â if (driver->cgroupControllers & (1 << controller)) > Â Â Â Â return true; > Â Â return false; > -- > 1.7.4.4 ACK. Matthias -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list