Received: from eggs.gnu.org ([2001:4830:134:3::10]:52252) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNyik-0004Wy-0Z for qemu-devel@nongnu.org; Fri, 15 Jul 2016 04:43:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bNyif-0000wK-4q for qemu-devel@nongnu.org; Fri, 15 Jul 2016 04:43:42 -0400 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]:33912) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNyie-0000w7-Tx for qemu-devel@nongnu.org; Fri, 15 Jul 2016 04:43:37 -0400 Received: by mail-wm0-x243.google.com with SMTP id q128so1326590wma.1 for ; Fri, 15 Jul 2016 01:43:36 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Fri, 15 Jul 2016 10:43:32 +0200 Message-Id: <1468572212-24209-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH] net: fix incorrect access to pointer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: jasowang@redhat.com This is not dereferencing the pointer, and instead checking only the value of the pointer. Signed-off-by: Paolo Bonzini --- net/eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/eth.c b/net/eth.c index 0be59c2..df81efb 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); -- 2.7.4