aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-diameter.c
diff options
context:
space:
mode:
authorJoakim Karlsson <oakimk@gmail.com>2018-11-23 18:00:03 +0100
committerAnders Broman <a.broman58@gmail.com>2018-11-25 07:08:10 +0000
commitc71f4d08889a29e5d12f2e1ef63957a7e651818a (patch)
treec0beb73c774f569c069aec3990f40254157d7a20 /epan/dissectors/packet-diameter.c
parent8915deaef33faaf0a2acf675054a03af5c0ba321 (diff)
diameter: remove message length limiter
RFC 6733, ch3. specifies message length field as three octets and indicates the length of the Diameter message including headers and padding. Change-Id: I73694a085bbafb3ae280e02fa4c9e26868b31f76 Reviewed-on: https://code.wireshark.org/review/30772 Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-diameter.c')
-rw-r--r--epan/dissectors/packet-diameter.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/epan/dissectors/packet-diameter.c b/epan/dissectors/packet-diameter.c
index 274203d048..33a53f2c7d 100644
--- a/epan/dissectors/packet-diameter.c
+++ b/epan/dissectors/packet-diameter.c
@@ -1441,7 +1441,6 @@ get_diameter_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb,
static gint
check_diameter(tvbuff_t *tvb)
{
- guint32 diam_len;
guint8 flags;
/* Ensure we don't throw an exception trying to do these heuristics */
@@ -1452,14 +1451,6 @@ check_diameter(tvbuff_t *tvb)
if (tvb_get_guint8(tvb, 0) != 1)
return NOT_DIAMETER;
- /* Check if the message size is reasonable.
- * Diameter messages can technically be of any size; this limit
- * is just a practical one (feel free to tune it).
- */
- diam_len = tvb_get_ntoh24(tvb, 1);
- if (diam_len > 65534)
- return NOT_DIAMETER;
-
/* Diameter minimum message length:
*
* Version+Length - 4 bytes
@@ -1474,7 +1465,7 @@ check_diameter(tvbuff_t *tvb)
*
* --> 36 bytes
*/
- if (diam_len < 36)
+ if (tvb_get_ntoh24(tvb, 1) < 36)
return NOT_DIAMETER;
flags = tvb_get_guint8(tvb, 4);