If vnet support is not available on the tap device, offset is uninitialized and
badness ensues.
Signed-off-by: Anthony Liguori <[EMAIL PROTECTED]>
diff --git a/qemu/hw/virtio-net.c b/qemu/hw/virtio-net.c
index b5d5f9e..4d7e6ad 100644
--- a/qemu/hw/virtio-net.c
+++ b/qemu/hw/virtio-net.c
@@ -219,7 +219,7 @@ static int receive_header(VirtIONet *n, struct iovec *iov,
int iovcnt,
const void *buf, int size, int hdr_len)
{
struct virtio_net_hdr *hdr = iov[0].iov_base;
- int offset;
+ int offset = 0;
hdr->flags = 0;
hdr->gso_type = VIRTIO_NET_HDR_GSO_NONE;
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html