aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dtls.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-dtls.c')
-rw-r--r--epan/dissectors/packet-dtls.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/epan/dissectors/packet-dtls.c b/epan/dissectors/packet-dtls.c
index 6878efd3f7..21e3ec6226 100644
--- a/epan/dissectors/packet-dtls.c
+++ b/epan/dissectors/packet-dtls.c
@@ -668,6 +668,7 @@ dissect_dtls_record(tvbuff_t *tvb, packet_info *pinfo,
guint8 next_byte;
proto_tree *ti;
proto_tree *dtls_record_tree;
+ proto_item *pi;
SslDataInfo *appl_data;
heur_dtbl_entry_t *hdtbl_entry;
@@ -734,8 +735,11 @@ dissect_dtls_record(tvbuff_t *tvb, packet_info *pinfo,
offset += 6;
/* add the length */
- proto_tree_add_uint(dtls_record_tree, hf_dtls_record_length, tvb,
+ pi = proto_tree_add_uint(dtls_record_tree, hf_dtls_record_length, tvb,
offset, 2, record_length);
+ if (record_length > TLS_MAX_RECORD_LENGTH) {
+ expert_add_info(pinfo, pi, &dissect_dtls_hf.ei.record_length_invalid);
+ }
offset += 2; /* move past length field itself */
/*