diff options
author | etxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7> | 2010-06-22 13:29:33 +0000 |
---|---|---|
committer | etxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7> | 2010-06-22 13:29:33 +0000 |
commit | b7f52ad6b5ac7f3de4e585b8ea93679b5ce1fdcf (patch) | |
tree | 0c0b9ccc523cdef0d387f0e052810efb53037d7b /epan/dissectors/packet-gmhdr.c | |
parent | 0e45db676d766db2299b96874cac1bef89cf42ea (diff) |
If the trailer is less than 4 bytes it's not a Gigamon hdr.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@33287 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-gmhdr.c')
-rw-r--r-- | epan/dissectors/packet-gmhdr.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/epan/dissectors/packet-gmhdr.c b/epan/dissectors/packet-gmhdr.c index 04fa14ddc9..18417878f5 100644 --- a/epan/dissectors/packet-gmhdr.c +++ b/epan/dissectors/packet-gmhdr.c @@ -199,6 +199,11 @@ dissect_gmtrailer(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) guint offset; guint16 cksum, comp_cksum; + offset = tvb_reported_length(tvb); + if (offset<4){ + return 0; + } + /* See if this packet has a Gigamon trailer, if yes, then decode it */ if (tvb_get_ntohs(tvb, -4) != ETHERTYPE_GIGAMON) { return 0; |