Skip to contentSkip to conversation

[6847] qemu:virtio-net: Check return size on the correct sg list ( Alex Williamson)

Qemu-devel Anthony Liguori 1 participant 1 message Mar 13, 2009

lore
Share & tools
lore
#0 lore raw

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.

Modified Paths:
--------------

    branches/stable_0_10_0/hw/virtio-net.c

Modified: branches/stable_0_10_0/hw/virtio-net.c
===================================================================

stable_0_10_0/hw/virtio-net.c +1 -1
@@ -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);
         }