aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-mac-lte.c
diff options
context:
space:
mode:
authormartinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7>2009-04-30 13:18:56 +0000
committermartinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7>2009-04-30 13:18:56 +0000
commit2081704e59c2b38e0498f248ff0e16a4bc209535 (patch)
treef8c71b87c4acb4ce9ebd1725b578a79db22d362d /epan/dissectors/packet-mac-lte.c
parent2a0fea8a7786a7d871102c8500bbc6f355d35119 (diff)
Another check/expert error for RARs.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28198 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-mac-lte.c')
-rw-r--r--epan/dissectors/packet-mac-lte.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/epan/dissectors/packet-mac-lte.c b/epan/dissectors/packet-mac-lte.c
index cf972577c7..af0e959d20 100644
--- a/epan/dissectors/packet-mac-lte.c
+++ b/epan/dissectors/packet-mac-lte.c
@@ -413,7 +413,6 @@ static gint dissect_rar_entry(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
/* Create subtree for UL grant break-down */
proto_tree *ul_grant_tree = proto_item_add_subtree(ul_grant_ti, ett_mac_lte_rar_ul_grant);
-
/* Hopping flag (1 bit) */
proto_tree_add_item(ul_grant_tree, hf_mac_lte_rar_ul_grant_hopping,
tvb, offset, 1, FALSE);
@@ -575,6 +574,13 @@ static void dissect_rar(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* Update TAP info */
tap_info->number_of_rars += number_of_rars;
+
+ /* Warn if we don't seem to have reached the end of the frame yet */
+ if (tvb_length_remaining(tvb, offset) != 0) {
+ expert_add_info_format(pinfo, rar_headers_ti, PI_MALFORMED, PI_ERROR,
+ "%u bytes remaining after RAR PDU dissected",
+ tvb_length_remaining(tvb, offset));
+ }
}
@@ -1471,7 +1477,7 @@ void proto_register_mac_lte(void)
},
{ &hf_mac_lte_rar_rapid,
{ "RAPID",
- "mac-lte.rar.rapid", FT_UINT8, BASE_HEX, 0, 0x3f,
+ "mac-lte.rar.rapid", FT_UINT8, BASE_HEX_DEC, 0, 0x3f,
"Random Access Preamble IDentifier", HFILL
}
},