TCP tap: check if have seglen before using it

This commit is contained in:
David Perry 2022-08-17 19:41:05 +00:00 committed by Gerald Combs
parent 9445bda1d8
commit 3b36ae4b1a
1 changed files with 3 additions and 1 deletions

View File

@ -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);