aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio-net.c
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-03-13 15:04:02 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-03-13 15:04:02 +0000
commitc6bb9a32cb97214b2ee0845858c27c24c8da61da (patch)
tree4e3020f169ab1b6d21164455df886ed582eb1e94 /hw/virtio-net.c
parent3450df304d6f6ad279a8c9ae98984898ea737a44 (diff)
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 <alex.williamson@hp.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6845 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/virtio-net.c')
-rw-r--r--hw/virtio-net.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/virtio-net.c b/hw/virtio-net.c
index e83d1019c1..ad55bb7610 100644
--- a/hw/virtio-net.c
+++ b/hw/virtio-net.c
@@ -228,7 +228,7 @@ static void virtio_net_handle_ctrl(VirtIODevice *vdev, VirtQueue *vq)
}
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);
}