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
This commit is contained in:
Ronnie Sahlberg 2005-09-23 20:51:09 +00:00
parent e34467a28c
commit 44fb2d3d56
1 changed files with 1 additions and 0 deletions

View File

@ -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));