diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2017-01-18 21:32:22 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2017-01-19 23:00:31 +0200 |
commit | 6bdc21c050a2a7b92cbbd0b2a1f8934e9b5f896f (patch) | |
tree | ebcac17c0918349166324f39fb342222f06ebdb0 /Changelog | |
parent | 9568700563151a5ce68fd7e61a38b72fbba7273d (diff) | |
download | qemu-6bdc21c050a2a7b92cbbd0b2a1f8934e9b5f896f.zip qemu-6bdc21c050a2a7b92cbbd0b2a1f8934e9b5f896f.tar.gz qemu-6bdc21c050a2a7b92cbbd0b2a1f8934e9b5f896f.tar.bz2 |
virtio: fix up max size checks
Coverity reports that ARRAY_SIZE(elem->out_sg) (and all the others too)
is wrong because elem->out_sg is a pointer.
However, the check is not in the right place and the max_size argument
of virtqueue_map_iovec can be removed. The check on in_num/out_num
should be moved to qemu_get_virtqueue_element instead, before the call
to virtqueue_alloc_element.
Cc: qemu-stable@nongnu.org
Reported-by: Paolo Bonzini <pbonzini@redhat.com>
Fixes: 3724650db07057333879484c8bc7d900b5c1bf8e ("virtio: introduce virtqueue_alloc_element")
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'Changelog')
0 files changed, 0 insertions, 0 deletions