Received: from eggs.gnu.org ([2001:4830:134:3::10]:48913) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTpyg-0002yj-8n for qemu-devel@nongnu.org; Tue, 16 Sep 2014 06:27:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XTpya-0002wU-QY for qemu-devel@nongnu.org; Tue, 16 Sep 2014 06:27:18 -0400 Received: from mail-wi0-x22a.google.com ([2a00:1450:400c:c05::22a]:44764) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTpya-0002w3-JU for qemu-devel@nongnu.org; Tue, 16 Sep 2014 06:27:12 -0400 Received: by mail-wi0-f170.google.com with SMTP id em10so3697783wid.5 for ; Tue, 16 Sep 2014 03:27:04 -0700 (PDT) Date: Tue, 16 Sep 2014 11:27:00 +0100 From: Stefan Hajnoczi Message-ID: <20140916102700.GB22174@stefanha-thinkpad.redhat.com> References: <1410785578-29277-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="NMuMz9nt05w80d4+" Content-Disposition: inline In-Reply-To: <1410785578-29277-1-git-send-email-pbonzini@redhat.com> Subject: Re: [Qemu-devel] [PATCH] aio-win32: avoid out-of-bounds access to the events array List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: kwolf@redhat.com, geleman@gmail.com, famz@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com --NMuMz9nt05w80d4+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 15, 2014 at 02:52:58PM +0200, Paolo Bonzini wrote: > If ret is WAIT_TIMEOUT and there was an event returned by select(), > we can write to a location after the end of the array. But in > that case we can retry the WaitForMultipleObjects call with the > same set of events, so just move the event[ret - WAIT_OBJECT_0] > assignment inside the existin conditional. >=20 > Reported-by: TeLeMan > Signed-off-by: Paolo Bonzini > --- > aio-win32.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) Thanks, applied to my block tree: https://github.com/stefanha/qemu/commits/block Stefan --NMuMz9nt05w80d4+ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJUGBB0AAoJEJykq7OBq3PIQrEH/0PIRiFGmDzeTQh2gJkmzbqQ 8gp0+xALmesslMmieAIUKK3+wghcj43oRsyCeHh26JGvOkCdxCMkdT0GNHUA6Kmq IG0SMxHqOan8LVBcAuqoW+BAYqEi0DynGwyjb9Ub+1h6kdBMCjW74Gp4unOn2sim 9DSgj7XvC7ak0eMGZSXaCL7xesYJdSeD365dfniD1isZn/q1iO3OCKnBbhR2t7/0 JPnopKBa53Opi5jaUX6u4hLx+X1Iao1mHJMrY6/oAQ6k/C3eJxKgICcyKqmacliV gX3bw8KnitjNy0FsKA620Kk4ChuWM2/isS/lFWRz2+M2q2Tm2hHZySd6yiQvIX0= =dinM -----END PGP SIGNATURE----- --NMuMz9nt05w80d4+--