diff options
author | Anders Broman <anders.broman@ericsson.com> | 2013-03-11 19:32:33 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2013-03-11 19:32:33 +0000 |
commit | dd33c46501e4882601211e246aa34a3f828cef73 (patch) | |
tree | 599dae65a5da063d5b71cca12ea7e87d12797faf /epan/dissectors/packet-gmhdr.c | |
parent | 9a5368a705b7752b7cfeee2e027ac6ee2976cead (diff) |
Improve heuristics for gmtrailer.
svn path=/trunk/; revision=48255
Diffstat (limited to 'epan/dissectors/packet-gmhdr.c')
-rw-r--r-- | epan/dissectors/packet-gmhdr.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/epan/dissectors/packet-gmhdr.c b/epan/dissectors/packet-gmhdr.c index 608ef24091..0f9efb9568 100644 --- a/epan/dissectors/packet-gmhdr.c +++ b/epan/dissectors/packet-gmhdr.c @@ -332,13 +332,15 @@ dissect_gmtrailer(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void return 0; extra_trailer = 0; if (tvb_get_ntohs(tvb, tvblen-4) != ETHERTYPE_GIGAMON) { + if (tvblen < 10){ + return 0; + } if (tvb_get_ntohs(tvb, tvblen-8) == ETHERTYPE_GIGAMON) { extra_trailer = 4; } else { return 0; } } - length = tvb_get_guint8(tvb, tvblen-extra_trailer-5); /* length of Gigamon header */ if ((tvblen-extra_trailer-5) != length) return 0; |