OpenSafety: sanity check calculated length.
Original sanity check was missed for fragmentation Bug: 13755 Change-Id: If9e24e01a119c869b02f198456776c8e6c6f2ad0 Reviewed-on: https://code.wireshark.org/review/22193 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
This commit is contained in:
parent
1247693a99
commit
66c50585e5
|
@ -1278,6 +1278,8 @@ dissect_opensafety_ssdo_message(tvbuff_t *message_tvb, packet_info *pinfo, proto
|
|||
item = proto_tree_add_uint_format_value(ssdo_tree, hf_oss_ssdo_payload_size, message_tvb, payloadOffset - 4, 4,
|
||||
payloadSize, "%d octets total (%d octets in this frame)", payloadSize, calcDataLength);
|
||||
|
||||
if ( calcDataLength >= 0 )
|
||||
{
|
||||
if ( fragmentId != 0 && packet->payload.ssdo->sacmd.segmented )
|
||||
{
|
||||
pinfo->fragmented = TRUE;
|
||||
|
@ -1295,8 +1297,6 @@ dissect_opensafety_ssdo_message(tvbuff_t *message_tvb, packet_info *pinfo, proto
|
|||
}
|
||||
}
|
||||
|
||||
if ( (gint) calcDataLength >= (gint) 0 )
|
||||
{
|
||||
proto_tree_add_item(ssdo_tree, hf_oss_ssdo_payload, message_tvb, payloadOffset, calcDataLength, ENC_NA );
|
||||
} else {
|
||||
if ( global_opensafety_debug_verbose )
|
||||
|
|
Loading…
Reference in New Issue