From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53679) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WxqFc-0005QH-Gj for qemu-devel@nongnu.org; Fri, 20 Jun 2014 00:16:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WxqFW-0007es-DL for qemu-devel@nongnu.org; Fri, 20 Jun 2014 00:16:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42370) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WxqFW-0007eH-5k for qemu-devel@nongnu.org; Fri, 20 Jun 2014 00:16:26 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s5K4GNLa022892 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 20 Jun 2014 00:16:24 -0400 Date: Fri, 20 Jun 2014 12:16:18 +0800 From: Stefan Hajnoczi Message-ID: <20140620041618.GB11029@stefanha-thinkpad.redhat.com> References: <1401970536-18019-1-git-send-email-armbru@redhat.com> <1401970536-18019-4-git-send-email-armbru@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9zSXsLTf0vkW971A" Content-Disposition: inline In-Reply-To: <1401970536-18019-4-git-send-email-armbru@redhat.com> Subject: Re: [Qemu-devel] [PATCH 3/3] virtio-blk: Treat read/write beyond end as invalid List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: kwolf@redhat.com, qemu-devel@nongnu.org, uobergfe@redhat.com --9zSXsLTf0vkW971A Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Jun 05, 2014 at 02:15:36PM +0200, Markus Armbruster wrote: > + if (sector > total_sectors || nb_sectors > total_sectors - sector) { > + return false; > + } if (sector >= total_sectors || ...) { --9zSXsLTf0vkW971A Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJTo7WSAAoJEJykq7OBq3PIZSUIAMgcAiGjbs0kHOadgzx1sfb+ sTacDVMFMgpmm3s685lUgT5QRiTpDMNXVq8R39QuSlP8D1xa434MBR8sTPYGMcW/ 6V1EJlVzGE8y1Rol1SqXNuveV3x219bo7QtwgIZ3938D/mLwryefB00wjKihDtg6 4iPpZw7Jg1kjNiqU8+7bP/c8HlLaDVJrUNVRP1HSRs7yQDrzEZLdRJumMgt0PK51 BQxbz9/614vxxZY9E0Mem6kZrNpLmpOgsWjJqC+kWE/t1zSAp74PcY7P67YXY7/4 YNakcs4TmhT5ndEH4ZlGUqoxtIqomS+kEIqnimzz5S7h21ZNbnNYJqybTBRtIUs= =kUPJ -----END PGP SIGNATURE----- --9zSXsLTf0vkW971A--