net: fix incorrect access to pointer
PATCH 1/1 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 <[email protected]>
--- net/eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/eth.c +1 -1
@@ -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);
Signature · 1 line
2.7.4
Jason Wang
AppliedQuoted 13 lines · Paolo Bonzini
This is not dereferencing the pointer, and instead checking only the value of the pointer.
Signed-off-by Paolo Bonzini <[email protected]>--- net/eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)net/eth.c +0
-0
net/eth.c void eth_get_protocols(const struct iovec *iov, int iovcnt, · line 217
Quoted 8 lines
net/eth.c +1
-1@@ -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);
Applied to -net. Thanks