diff --git a/epan/dissectors/packet-cipsafety.c b/epan/dissectors/packet-cipsafety.c index 233e6b5161..6156decb7d 100644 --- a/epan/dissectors/packet-cipsafety.c +++ b/epan/dissectors/packet-cipsafety.c @@ -1511,6 +1511,11 @@ dissect_cip_safety_data( proto_tree *tree, proto_item *item, tvbuff_t *tvb, int /* compute the base packet length to determine what is actual I/O data */ base_length = multicast ? 12 : 6; + if (item_length <= base_length) { + expert_add_info(pinfo, item, &ei_mal_io); + return; + } + if (((conn_type == ECIDT_O2T) && (server_dir == FALSE)) || ((conn_type == ECIDT_T2O) && (server_dir == TRUE))) {