diff options
author | stig <stig@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-10-29 18:26:57 +0000 |
---|---|---|
committer | stig <stig@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-10-29 18:26:57 +0000 |
commit | c1d710b46750b9792cf5d741bab8341b242a24d9 (patch) | |
tree | 1c8104f27bc0dc2bae3ad8023fd4fb6a437bda40 /asn1 | |
parent | c4c3b2a02e2b4692e3e3a24f0d9a4035806e68a0 (diff) |
Added support for big integer64 values.
This fixes bug 6295.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39666 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'asn1')
-rw-r--r-- | asn1/snmp/packet-snmp-template.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/asn1/snmp/packet-snmp-template.c b/asn1/snmp/packet-snmp-template.c index b74427bf2d..c1961c63fb 100644 --- a/asn1/snmp/packet-snmp-template.c +++ b/asn1/snmp/packet-snmp-template.c @@ -824,7 +824,15 @@ indexing_done: hfid = hf_snmp_unknown_value; break; } - + if ((value_len == 9) && (tvb_get_guint8(tvb, value_offset) == 0)) { + /* Check if this is an unsigned int64 with a big value */ + header_field_info *hfinfo = proto_registrar_get_nth(hfid); + if (hfinfo->type == FT_UINT64) { + /* Cheat and skip the leading 0 byte */ + value_len--; + value_offset++; + } + } pi_value = proto_tree_add_item(pt_varbind,hfid,tvb,value_offset,value_len,ENC_BIG_ENDIAN); if (format_error != BER_NO_ERROR) { expert_add_info_format(actx->pinfo, pi_value, PI_UNDECODED, PI_NOTE, "Unresolved value, Missing MIB"); |