aboutsummaryrefslogtreecommitdiffstats
path: root/asn1
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2008-02-25 00:00:41 +0000
committerGerald Combs <gerald@wireshark.org>2008-02-25 00:00:41 +0000
commit1997308ac1840369c6ccc2a1577b24e864873b5d (patch)
tree1f5181f85b1bfee1f5bfc7195b4e1b469c9f136d /asn1
parent32ae9c1d7fc721de5b44ddafa1d2a1b372e28d70 (diff)
Handle unsigned SMI types. This should fix bug 2292.
svn path=/trunk/; revision=24457
Diffstat (limited to 'asn1')
-rw-r--r--asn1/snmp/packet-snmp-template.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/asn1/snmp/packet-snmp-template.c b/asn1/snmp/packet-snmp-template.c
index 5fed69f161..128fe52f03 100644
--- a/asn1/snmp/packet-snmp-template.c
+++ b/asn1/snmp/packet-snmp-template.c
@@ -551,7 +551,11 @@ extern int dissect_snmp_VarBind(gboolean implicit_tag _U_,
goto indexing_done;
}
case OID_KEY_TYPE_INTEGER: {
- proto_tree_add_int(pt_name,k->hfid,tvb,name_offset,name_len,(guint)subids[key_start]);
+ if (IS_FT_INT(k->ft_type)) {
+ proto_tree_add_int(pt_name,k->hfid,tvb,name_offset,name_len,(guint)subids[key_start]);
+ } else { /* if it's not an unsigned int let proto_tree_add_uint throw a warning */
+ proto_tree_add_uint(pt_name,k->hfid,tvb,name_offset,name_len,(guint)subids[key_start]);
+ }
key_start++;
key_len--;
continue; /* k->next */