diff options
author | wmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-07-21 22:34:50 +0000 |
---|---|---|
committer | wmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-07-21 22:34:50 +0000 |
commit | dc10e5e8df9b7f067ba1d8f43ba3b3ffea5909f2 (patch) | |
tree | bc2a0e78b21a05323fb28894d5f159c1f1607d82 | |
parent | 1939cae685fa4027f324142554b9935a6384da41 (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
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@38158 f5534014-38df-0310-8fa8-9805f1628bb7
-rw-r--r-- | epan/dissectors/packet-lon.c | 10 |
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 } }, |