Blob Blame History Raw
diff --git a/epan/dissectors/packet-dcm.c b/epan/dissectors/packet-dcm.c
index 1dd8959..bcf613b 100644
--- a/epan/dissectors/packet-dcm.c
+++ b/epan/dissectors/packet-dcm.c
@@ -5697,6 +5697,10 @@ dissect_dcm_tag_value(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, dcm_s
     if (pdv->syntax == DCM_EBE)	is_little_endian = FALSE;
     else			is_little_endian = TRUE;
 
+    /* Make sure we have all the bytes of the item; this should throw
+       and exception if vl_max is so large that it causes the offset
+       to overflow. */
+    tvb_ensure_bytes_exist(tvb, offset, vl_max);
 
     /* ---------------------------------------------------------------------------
        Potentially long types. Obey vl_max