Skip to content

Commit

Permalink
TCP tap: check if have seglen before using it
Browse files Browse the repository at this point in the history
  • Loading branch information
Boolean263 authored and geraldcombs committed Aug 17, 2022
1 parent 9445bda commit 3b36ae4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion epan/dissectors/packet-tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 3b36ae4

Please sign in to comment.