Wireshark-bugs: [Wireshark-bugs] [Bug 12252] DCP-ETSI dissector always declares malformed packet
Date: Sat, 02 Apr 2016 12:11:59 +0000

Comment # 3 on bug 12252 from
I'm afraid I've got mixed up in the code review. I'm not familiar with gerrit
and my commits are very confused.

I've now found the root cause of this bug. In dissect_af the new tvb has no
length specified. This causes the dissect_tpl dissectory to think that the CRC
after the payload is part of the payload. This can be fixed with the following
change:

diff --git a/epan/dissectors/packet-dcp-etsi.c
b/epan/dissectors/packet-dcp-etsi.c
index 4eaa5be..e719b0e 100644
--- a/epan/dissectors/packet-dcp-etsi.c
+++ b/epan/dissectors/packet-dcp-etsi.c
@@ -575,7 +575,7 @@ dissect_af (tvbuff_t * tvb, packet_info * pinfo, proto_tree
* tree, void* data _
   pt = tvb_get_guint8 (tvb, offset);
   proto_tree_add_item (af_tree, hf_edcp_pt, tvb, offset, 1, ENC_ASCII|ENC_NA);
   offset += 1;
-  next_tvb = tvb_new_subset (tvb, offset, payload_len, -1);
+  next_tvb = tvb_new_subset (tvb, offset, payload_len, payload_len);
   offset += payload_len;
   ci = proto_tree_add_item (af_tree, hf_edcp_crc, tvb, offset, 2,
ENC_BIG_ENDIAN);
   if (ver & 0x80) { /* crc valid */


You are receiving this mail because:
  • You are watching all bug changes.