diff options
author | David Perry <boolean263@protonmail.com> | 2022-08-17 19:41:05 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2022-08-17 19:41:05 +0000 |
commit | 3b36ae4b1ae674bfc8b4825e113187556b4ad624 (patch) | |
tree | ba2579abb73f08238c35dec98578143fe7de2ffc /epan | |
parent | 9445bda1d8949dbb53d08feff193484ab64ad888 (diff) |
TCP tap: check if have seglen before using it
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-tcp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/epan/dissectors/packet-tcp.c b/epan/dissectors/packet-tcp.c index b926e5d5ac..83b0447ad5 100644 --- a/epan/dissectors/packet-tcp.c +++ b/epan/dissectors/packet-tcp.c @@ -1191,7 +1191,9 @@ follow_tcp_tap_listener(void *tapdata, packet_info *pinfo, const tcp_follow_tap_data_t *follow_data = (const tcp_follow_tap_data_t *)data; gboolean is_server; guint32 sequence = follow_data->tcph->th_seq; - guint32 length = follow_data->tcph->th_seglen; + guint32 length = follow_data->tcph->th_have_seglen + ? follow_data->tcph->th_seglen + : 0; guint32 data_offset = 0; guint32 data_length = tvb_captured_length(follow_data->tvb); |