aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-lon.c
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2011-07-21 22:34:50 +0000
committerBill Meier <wmeier@newsguy.com>2011-07-21 22:34:50 +0000
commit2e4ea6c4d0a61f7ece4a41ec584ec0387553ff42 (patch)
treebc2a0e78b21a05323fb28894d5f159c1f1607d82 /epan/dissectors/packet-lon.c
parent5de7f53e08faac0bc87bf352bee1d9c88dd6c854 (diff)
From Daniel Willmann: packet-lon.c: Fix Multicast decoding when M_Length is zero.
In case M_Length is 0 the M_List field does not exist. The attached patch fixes this and it also changes the names of the M_List and M_List length field to more general names. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6149 svn path=/trunk/; revision=38158
Diffstat (limited to 'epan/dissectors/packet-lon.c')
-rw-r--r--epan/dissectors/packet-lon.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/epan/dissectors/packet-lon.c b/epan/dissectors/packet-lon.c
index df6eff356f..5785051113 100644
--- a/epan/dissectors/packet-lon.c
+++ b/epan/dissectors/packet-lon.c
@@ -336,7 +336,8 @@ dissect_lon(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
length = tvb_get_guint8(tvb, offset);
proto_tree_add_item(lon_tree, hf_lon_mlen, tvb, offset, 1, ENC_NA);
offset++;
- proto_tree_add_item(lon_tree, hf_lon_mlist, tvb, offset, length, ENC_NA);
+ if (length > 0)
+ proto_tree_add_item(lon_tree, hf_lon_mlist, tvb, offset, length, ENC_NA);
offset += length;
offset += dissect_apdu(lon_tree, pinfo, tvb, offset);
} else {
@@ -367,7 +368,8 @@ dissect_lon(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
length = tvb_get_guint8(tvb, offset);
proto_tree_add_item(lon_tree, hf_lon_mlen, tvb, offset, 1, ENC_NA);
offset++;
- proto_tree_add_item(lon_tree, hf_lon_mlist, tvb, offset, length, ENC_NA);
+ if (length > 0)
+ proto_tree_add_item(lon_tree, hf_lon_mlist, tvb, offset, length, ENC_NA);
offset += length;
offset += dissect_apdu(lon_tree, pinfo, tvb, offset);
} else {
@@ -594,12 +596,12 @@ proto_register_lon(void)
NULL, HFILL }
},
{&hf_lon_mlen,
- {"SPDU Length of M_List", "lon.spdu.mlen",
+ {"Length of M_List", "lon.spdu.mlen",
FT_UINT8, BASE_HEX, NULL, 0,
NULL, HFILL }
},
{&hf_lon_mlist,
- {"SPDU M_List", "lon.spdu.mlist",
+ {"M_List", "lon.spdu.mlist",
FT_UINT8, BASE_HEX, NULL, 0,
NULL, HFILL }
},