From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Li8vd-00021U-OB for qemu-devel@nongnu.org; Fri, 13 Mar 2009 11:04:05 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Li8vc-0001zj-Ut for qemu-devel@nongnu.org; Fri, 13 Mar 2009 11:04:05 -0400 Received: from [199.232.76.173] (port=40812 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Li8vc-0001yz-HS for qemu-devel@nongnu.org; Fri, 13 Mar 2009 11:04:04 -0400 Received: from savannah.gnu.org ([199.232.41.3]:41768 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Li8vc-00089h-5z for qemu-devel@nongnu.org; Fri, 13 Mar 2009 11:04:04 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Li8vb-0008DV-KP for qemu-devel@nongnu.org; Fri, 13 Mar 2009 15:04:03 +0000 Received: from aliguori by cvs.savannah.gnu.org with local (Exim 4.69) (envelope-from ) id 1Li8vb-0008DR-6n for qemu-devel@nongnu.org; Fri, 13 Mar 2009 15:04:03 +0000 MIME-Version: 1.0 Errors-To: aliguori Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Anthony Liguori Message-Id: Date: Fri, 13 Mar 2009 15:04:03 +0000 Subject: [Qemu-devel] [6845] qemu:virtio-net: Check return size on the correct sg list ( Alex Williamson) Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 6845 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6845 Author: aliguori Date: 2009-03-13 15:04:02 +0000 (Fri, 13 Mar 2009) Log Message: ----------- qemu:virtio-net: Check return size on the correct sg list (Alex Williamson) When checking that the size of the control virtqueue return field is sufficient, use the correct sg list. Signed-off-by: Alex Williamson Signed-off-by: Anthony Liguori Modified Paths: -------------- trunk/hw/virtio-net.c Modified: trunk/hw/virtio-net.c =================================================================== --- trunk/hw/virtio-net.c 2009-03-13 15:03:58 UTC (rev 6844) +++ trunk/hw/virtio-net.c 2009-03-13 15:04:02 UTC (rev 6845) @@ -228,7 +228,7 @@ } if (elem.out_sg[0].iov_len < sizeof(ctrl) || - elem.out_sg[elem.in_num - 1].iov_len < sizeof(status)) { + elem.in_sg[elem.in_num - 1].iov_len < sizeof(status)) { fprintf(stderr, "virtio-net ctrl header not in correct element\n"); exit(1); }