virtio-pci: don't crash on illegal length
authorMichael S. Tsirkin <mst@redhat.com>
Mon, 13 Jul 2015 07:32:50 +0000 (10:32 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 13 Jul 2015 11:42:24 +0000 (14:42 +0300)
commit2a6391232fa58f32469fb61d55343eff32a91083
tree5bfbc98f9b3a2893d20497e44cdf3c3309eb8ad5
parent8aedc369c6ae4fb4c4c6920f703b000015df3d8d
virtio-pci: don't crash on illegal length

Some guests seem to access cfg with an illegal length value.
It's worth fixing them but debugging is easier if
qemu does not crash.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/virtio/virtio-pci.c