mirror of https://github.com/xemu-project/xemu.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 <pbonzini@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
This commit is contained in:
parent
1ac6c07f42
commit
2c5e564f4d
|
@ -211,7 +211,7 @@ void eth_get_protocols(const struct iovec *iov, int iovcnt,
|
||||||
*l4hdr_off, sizeof(l4hdr_info->hdr.tcp),
|
*l4hdr_off, sizeof(l4hdr_info->hdr.tcp),
|
||||||
&l4hdr_info->hdr.tcp);
|
&l4hdr_info->hdr.tcp);
|
||||||
|
|
||||||
if (istcp) {
|
if (*istcp) {
|
||||||
*l5hdr_off = *l4hdr_off +
|
*l5hdr_off = *l4hdr_off +
|
||||||
TCP_HEADER_DATA_OFFSET(&l4hdr_info->hdr.tcp);
|
TCP_HEADER_DATA_OFFSET(&l4hdr_info->hdr.tcp);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue