summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2005-09-23 20:51:09 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2005-09-23 20:51:09 +0000
commit44fb2d3d5684e389ee76f610f312fca36250955c (patch)
treeba6a67d0814704054400eac8931f5a81e0e671f3
parente34467a28c88a74bc109164ea61c32f9068bc9e5 (diff)
downloadwireshark-44fb2d3d5684e389ee76f610f312fca36250955c.tar.gz
Dont decrement the length by 2 if it is already less than two
since then the length will wrap and become +4G or so. This fixes bug 479 svn path=/trunk/; revision=15982
-rw-r--r--epan/dissectors/packet-radius.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/epan/dissectors/packet-radius.c b/epan/dissectors/packet-radius.c
index 71a2c93ef9..4f293dd2fe 100644
--- a/epan/dissectors/packet-radius.c
+++ b/epan/dissectors/packet-radius.c
@@ -494,6 +494,7 @@ static void dissect_attribute_value_pairs(proto_tree *tree, packet_info *pinfo,
guint32 avp_vsa_type = tvb_get_guint8(tvb,offset++);
guint32 avp_vsa_len = tvb_get_guint8(tvb,offset++);
+ DISSECTOR_ASSERT(avp_vsa_len>2);
avp_vsa_len -= 2;
dictionary_entry = g_hash_table_lookup(vendor->attrs_by_id,GUINT_TO_POINTER(avp_vsa_type));