Remove superfluous size checks (CID-1158694)
Don't try to add expert items for size < 1 when this code isn't executed for size == 0. (note: size is unsigned) Change-Id: Ieb3d2593d4bb5f175ac368ef38571511b4f56f25 Reviewed-on: https://code.wireshark.org/review/15774 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
parent
74484c6ebf
commit
c1a38296e7
|
@ -6220,34 +6220,13 @@ dissect_cip_cm_data( proto_tree *item_tree, tvbuff_t *tvb, int offset, int item_
|
|||
}
|
||||
break;
|
||||
case CM_ES_INVALID_CONFIGURATION_SIZE:
|
||||
if (add_stat_size < 1)
|
||||
{
|
||||
expert_add_info(pinfo, status_item, &ei_mal_inv_config_size);
|
||||
}
|
||||
else
|
||||
{
|
||||
proto_tree_add_item(status_tree, hf_cip_cm_ext126_size, tvb, offset+6, 2, ENC_LITTLE_ENDIAN );
|
||||
}
|
||||
proto_tree_add_item(status_tree, hf_cip_cm_ext126_size, tvb, offset+6, 2, ENC_LITTLE_ENDIAN );
|
||||
break;
|
||||
case CM_ES_INVALID_OT_SIZE:
|
||||
if (add_stat_size < 1)
|
||||
{
|
||||
expert_add_info(pinfo, status_item, &ei_mal_ot_size);
|
||||
}
|
||||
else
|
||||
{
|
||||
proto_tree_add_item(status_tree, hf_cip_cm_ext127_size, tvb, offset+6, 2, ENC_LITTLE_ENDIAN );
|
||||
}
|
||||
proto_tree_add_item(status_tree, hf_cip_cm_ext127_size, tvb, offset+6, 2, ENC_LITTLE_ENDIAN );
|
||||
break;
|
||||
case CM_ES_INVALID_TO_SIZE:
|
||||
if (add_stat_size < 1)
|
||||
{
|
||||
expert_add_info(pinfo, status_item, &ei_mal_to_size);
|
||||
}
|
||||
else
|
||||
{
|
||||
proto_tree_add_item(status_tree, hf_cip_cm_ext128_size, tvb, offset+6, 2, ENC_LITTLE_ENDIAN );
|
||||
}
|
||||
proto_tree_add_item(status_tree, hf_cip_cm_ext128_size, tvb, offset+6, 2, ENC_LITTLE_ENDIAN );
|
||||
break;
|
||||
default:
|
||||
/* Add additional status */
|
||||
|
|
Loading…
Reference in New Issue