From 627917faff4889f763bf8e6570f62d66656047bd Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Wed, 28 Aug 2019 22:27:58 -0400 Subject: Gryphon: Prevent endless loop Bug: 16020 Change-Id: I59c24d3bdb3f3a85f6e498683594ee12db9642a8 Reviewed-on: https://code.wireshark.org/review/34392 Reviewed-by: Michael Mann Petri-Dish: Michael Mann Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- plugins/epan/gryphon/packet-gryphon.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/epan/gryphon/packet-gryphon.c b/plugins/epan/gryphon/packet-gryphon.c index 82d14eaca4..334c47611a 100644 --- a/plugins/epan/gryphon/packet-gryphon.c +++ b/plugins/epan/gryphon/packet-gryphon.c @@ -1193,7 +1193,11 @@ dissect_gryphon_message_with_offset(tvbuff_t *tvb, int offset, packet_info *pinf * Unknown message type. */ proto_tree_add_item(gryphon_tree, hf_gryphon_data, tvb, offset, msglen, ENC_NA); - offset += msglen; + if (msglen != 0) { + offset += msglen; + } else { + offset = tvb_reported_length_remaining(tvb, offset); + } return offset; } -- cgit v1.2.3