From: Kees Jongenburger Date: Tue, 24 Sep 2013 11:54:02 +0000 (+0200) Subject: block-dev:add additional sanity check. X-Git-Tag: v3.3.0~787 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/doc/syslog.conf.5.html?a=commitdiff_plain;h=6595e79da8214b536a8552e01cf1af21fe5a7bf1;p=minix.git block-dev:add additional sanity check. Change-Id: Ib5b7cd93a50726b95c2e1b4c7eeedfefc824dd9c --- diff --git a/lib/libbdev/bdev.c b/lib/libbdev/bdev.c index fb4dfc239..b950368f5 100644 --- a/lib/libbdev/bdev.c +++ b/lib/libbdev/bdev.c @@ -206,6 +206,7 @@ static int bdev_vrdwt_setup(int req, dev_t dev, u64_t pos, iovec_t *vec, gvec[i].iov_grant = grant; gvec[i].iov_size = vec[i].iov_size; + assert(vec[i].iov_size > 0); assert((ssize_t) (size + vec[i].iov_size) > size); size += vec[i].iov_size;