From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O9syW-00006D-HR for qemu-devel@nongnu.org; Thu, 06 May 2010 00:46:16 -0400 Received: from [140.186.70.92] (port=50624 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O9syR-0008OO-47 for qemu-devel@nongnu.org; Thu, 06 May 2010 00:46:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O9syP-0008A9-97 for qemu-devel@nongnu.org; Thu, 06 May 2010 00:46:10 -0400 Received: from hall.aurel32.net ([88.191.82.174]:46726) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O9syP-00089A-3w for qemu-devel@nongnu.org; Thu, 06 May 2010 00:46:09 -0400 Date: Thu, 6 May 2010 06:45:51 +0200 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH 6/7] Fix zero-length write(2). Message-ID: <20100506044550.GA21084@volta.aurel32.net> References: <259b99693dc30d50fec822d4b3356c7082ad0c12.1270488612.git.rth@twiddle.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <259b99693dc30d50fec822d4b3356c7082ad0c12.1270488612.git.rth@twiddle.net> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: blauwirbel@gmail.com, qemu-devel@nongnu.org On Mon, Mar 29, 2010 at 10:54:42AM -0700, Richard Henderson wrote: > Signed-off-by: Richard Henderson Thanks, applied. > --- > exec.c | 3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) > > diff --git a/exec.c b/exec.c > index 33854e1..d69194c 100644 > --- a/exec.c > +++ b/exec.c > @@ -2461,6 +2461,9 @@ int page_check_range(target_ulong start, target_ulong len, int flags) > assert(start < ((abi_ulong)1 << L1_MAP_ADDR_SPACE_BITS)); > #endif > > + if (len == 0) { > + return 0; > + } > if (start + len - 1 < start) { > /* We've wrapped around. */ > return -1; > -- > 1.6.6.1 > > > > -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net