aboutsummaryrefslogtreecommitdiffstats
path: root/packet-radius.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2001-06-18 09:31:15 +0000
committerGuy Harris <guy@alum.mit.edu>2001-06-18 09:31:15 +0000
commit4bb5c7d15e88c7a6426b9e1154d1d1880843b7ae (patch)
tree634ae07328c207f02d066710af4a1fcb25b43693 /packet-radius.c
parent516c93c5e31a9c22a93b04f09a75ab50ba2e144b (diff)
Don't list the attribute-value pairs if the length field of the packet
says there aren't any (i.e., if the length field minus the size of the stuff before the AVP's is less than or equal to 0). svn path=/trunk/; revision=3568
Diffstat (limited to 'packet-radius.c')
-rw-r--r--packet-radius.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/packet-radius.c b/packet-radius.c
index 432baadc23..7640ad3811 100644
--- a/packet-radius.c
+++ b/packet-radius.c
@@ -2,7 +2,7 @@
* Routines for RADIUS packet disassembly
* Copyright 1999 Johan Feyaerts
*
- * $Id: packet-radius.c,v 1.31 2001/06/18 02:17:51 guy Exp $
+ * $Id: packet-radius.c,v 1.32 2001/06/18 09:31:15 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -727,17 +727,19 @@ static void dissect_radius(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
hdrlength=RD_HDR_LENGTH+AUTHENTICATOR_LENGTH;
avplength= rhlength -hdrlength;
- /* list the attribute value pairs */
+ if (avplength > 0) {
+ /* list the attribute value pairs */
- avptf = proto_tree_add_text(radius_tree,
- tvb,hdrlength,avplength,
- "Attribute value pairs");
- avptree = proto_item_add_subtree(avptf, ett_radius_avp);
+ avptf = proto_tree_add_text(radius_tree,
+ tvb,hdrlength,avplength,
+ "Attribute value pairs");
+ avptree = proto_item_add_subtree(avptf, ett_radius_avp);
- if (avptree !=NULL)
- {
- dissect_attribute_value_pairs(tvb, hdrlength,
+ if (avptree !=NULL)
+ {
+ dissect_attribute_value_pairs(tvb, hdrlength,
avptree,avplength);
+ }
}
}
}