svn commit: r283075 - head/usr.sbin/bhyveload
Allan Jude
allanjude at FreeBSD.org
Mon May 18 19:45:47 UTC 2015
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;
More information about the svn-src-all
mailing list