Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LiA6I-0000vV-IN for qemu-devel@nongnu.org; Fri, 13 Mar 2009 12:19:10 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LiA6H-0000tz-L1 for qemu-devel@nongnu.org; Fri, 13 Mar 2009 12:19:09 -0400 Received: from [199.232.76.173] (port=36256 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LiA6H-0000tj-0R for qemu-devel@nongnu.org; Fri, 13 Mar 2009 12:19:09 -0400 Received: from savannah.gnu.org ([199.232.41.3]:38033 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 1LiA6G-0002BS-3Z for qemu-devel@nongnu.org; Fri, 13 Mar 2009 12:19:08 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1LiA6E-0006Bl-OS for qemu-devel@nongnu.org; Fri, 13 Mar 2009 16:19:06 +0000 Received: from aliguori by cvs.savannah.gnu.org with local (Exim 4.69) (envelope-from ) id 1LiA6D-0006Be-Iw for qemu-devel@nongnu.org; Fri, 13 Mar 2009 16:19:05 +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 16:19:05 +0000 Subject: [Qemu-devel] [6847] 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: 6847 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6847 Author: aliguori Date: 2009-03-13 16:19:04 +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: -------------- branches/stable_0_10_0/hw/virtio-net.c Modified: branches/stable_0_10_0/hw/virtio-net.c =================================================================== --- branches/stable_0_10_0/hw/virtio-net.c 2009-03-13 16:18:57 UTC (rev 6846) +++ branches/stable_0_10_0/hw/virtio-net.c 2009-03-13 16:19:04 UTC (rev 6847) @@ -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); }