From: Paolo Bonzini Date: Fri, 15 Jul 2016 08:43:32 +0000 (+0200) Subject: net: fix incorrect access to pointer X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=2c5e564f4d8309ee0f47029ab461c4c4459f43c4;p=qemu.git net: fix incorrect access to pointer This is not dereferencing the pointer, and instead checking only the value of the pointer. Signed-off-by: Paolo Bonzini Signed-off-by: Jason Wang --- diff --git a/net/eth.c b/net/eth.c index 95fe15c23f..c147c2ebb3 100644 --- a/net/eth.c +++ b/net/eth.c @@ -211,7 +211,7 @@ void eth_get_protocols(const struct iovec *iov, int iovcnt, *l4hdr_off, sizeof(l4hdr_info->hdr.tcp), &l4hdr_info->hdr.tcp); - if (istcp) { + if (*istcp) { *l5hdr_off = *l4hdr_off + TCP_HEADER_DATA_OFFSET(&l4hdr_info->hdr.tcp);