Check that the PDU isn't bigger than the reported grant size. Thought I was already...
authormartinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 24 May 2010 16:28:34 +0000 (16:28 +0000)
committermartinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 24 May 2010 16:28:34 +0000 (16:28 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32934 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-mac-lte.c

index 1102fcedbed6974cbdc695ff59f6c7628ca4af60..b3d8e84ec980fe86a11458896b9c2931c38e14b1 100644 (file)
@@ -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);
+        }
+    }
 }