aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2019-08-28 22:27:58 -0400
committerAnders Broman <a.broman58@gmail.com>2019-08-29 14:47:28 +0000
commit627917faff4889f763bf8e6570f62d66656047bd (patch)
treedb6202809ed3771ff8bf865c513ee68dd4e9dfc4 /plugins
parent01d7793976cca50519c6609dc2a4ba391946f07b (diff)
Gryphon: Prevent endless loop
Bug: 16020 Change-Id: I59c24d3bdb3f3a85f6e498683594ee12db9642a8 Reviewed-on: https://code.wireshark.org/review/34392 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/epan/gryphon/packet-gryphon.c6
1 files changed, 5 insertions, 1 deletions
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;
}