aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--epan/dissectors/packet-knet.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/epan/dissectors/packet-knet.c b/epan/dissectors/packet-knet.c
index 05a9d787e9..57842998bf 100644
--- a/epan/dissectors/packet-knet.c
+++ b/epan/dissectors/packet-knet.c
@@ -546,6 +546,14 @@ dissect_knet_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
static int
dissect_knet_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
{
+ //Sanity check the length field
+ if (tvb_reported_length(tvb) < 2)
+ return 0;
+
+ int offset = 0;
+ if (dissect_content_length_vle(tvb, &offset, NULL) == 0)
+ return 0;
+
col_clear(pinfo->cinfo, COL_INFO);
col_set_str(pinfo->cinfo, COL_PROTOCOL, "KNET");