aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormartinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7>2010-05-24 16:28:34 +0000
committermartinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7>2010-05-24 16:28:34 +0000
commit6b2b2ffaca793a4caf339c1a9cd7256eca07f942 (patch)
tree6fd199e4189fbf8e7957bf1bc4971c1ad2bf5a59
parent50a9d8f0e5eb4d1c1cfa8097039410ea996b5e04 (diff)
Check that the PDU isn't bigger than the reported grant size. Thought I was already doing this...
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32934 f5534014-38df-0310-8fa8-9805f1628bb7
-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 1102fcedbe..b3d8e84ec9 100644
--- a/epan/dissectors/packet-mac-lte.c
+++ b/epan/dissectors/packet-mac-lte.c
@@ -2769,11 +2769,17 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
if (!is_truncated && (offset < p_mac_lte_info->length)) {
/* There is a problem if we haven't used all of the PDU */
expert_add_info_format(pinfo, pdu_ti, PI_MALFORMED, PI_ERROR,
- "DL PDU for UE %u is shorter than reported length (reported=%u, actual=%u)",
+ "PDU for UE %u is shorter than reported length (reported=%u, actual=%u)",
p_mac_lte_info->ueid, p_mac_lte_info->length, offset);
}
- }
+ if (!is_truncated && (offset > p_mac_lte_info->length)) {
+ /* There is a problem if the PDU is longer than rpeported */
+ expert_add_info_format(pinfo, pdu_ti, PI_MALFORMED, PI_ERROR,
+ "PDU for UE %u is longer than reported length (reported=%u, actual=%u)",
+ p_mac_lte_info->ueid, p_mac_lte_info->length, offset);
+ }
+ }
}