From 90ac880b8a42bb8db31968dd9ef716252f0c8a6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dr=2E=20Lars=20V=C3=B6lker?= Date: Tue, 19 Jul 2022 23:33:53 +0200 Subject: [PATCH] TECMP: Fix CRC decoding on FlexRay Null Frames (Bugfix) Skipping FlexRay Null Frame Payload to avoid bogus CRC values. --- epan/dissectors/packet-tecmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epan/dissectors/packet-tecmp.c b/epan/dissectors/packet-tecmp.c index adf90798a5..7d33aaa438 100644 --- a/epan/dissectors/packet-tecmp.c +++ b/epan/dissectors/packet-tecmp.c @@ -1566,11 +1566,11 @@ dissect_tecmp_log_or_replay_stream(tvbuff_t *tvb, packet_info *pinfo, proto_tree length2 = MAX(0, MIN((gint)length2, tvb_captured_length_remaining(sub_tvb, offset2))); } - if ((dataflags & DATA_FLAG_FR_NF) == 0 && length2 > 0) { + if (length2 > 0) { payload_tvb = tvb_new_subset_length(sub_tvb, offset2, length2); offset2 += length2; - if (!flexray_call_subdissectors(payload_tvb, pinfo, tree, &fr_info, heuristic_first)) { + if ((dataflags & DATA_FLAG_FR_NF) != 0 && !flexray_call_subdissectors(payload_tvb, pinfo, tree, &fr_info, heuristic_first)) { dissect_data(payload_tvb, pinfo, tree, device_id, tecmp_msg_type, data_type, interface_id); } }