Date: Mon, 18 May 2015 19:45:47 +0000 (UTC) From: Allan Jude <allanjude@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283075 - head/usr.sbin/bhyveload Message-ID: <201505181945.t4IJjlSC092743@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: allanjude (doc committer) Date: Mon May 18 19:45:46 2015 New Revision: 283075 URL: https://svnweb.freebsd.org/changeset/base/283075 Log: Fix off-by-one in array index bounds check bhyveload would allow you to create 33 entries on an array that only has 32 slots Differential Revision: https://reviews.freebsd.org/D2569 Reviewed by: araujo Approved by: neel MFC after: 1 week Sponsored by: ScaleEngine Inc. Modified: head/usr.sbin/bhyveload/bhyveload.c Modified: head/usr.sbin/bhyveload/bhyveload.c ============================================================================== --- head/usr.sbin/bhyveload/bhyveload.c Mon May 18 19:37:55 2015 (r283074) +++ head/usr.sbin/bhyveload/bhyveload.c Mon May 18 19:45:46 2015 (r283075) @@ -609,7 +609,7 @@ disk_open(char *path) { int err, fd; - if (ndisks > NDISKS) + if (ndisks >= NDISKS) return (ERANGE); err = 0;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201505181945.t4IJjlSC092743>