summaryrefslogtreecommitdiff
path: root/epan/oids.c
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2008-04-22 19:31:03 +0000
committerAnders Broman <anders.broman@ericsson.com>2008-04-22 19:31:03 +0000
commit1d5cb5ff645a8235f129a1a82b1fe0d243372679 (patch)
tree41befde851f9503e8649b37a76e6b09b2d297ae3 /epan/oids.c
parenta0866910ef9e4849f217254c84106af53fb1f3dd (diff)
downloadwireshark-1d5cb5ff645a8235f129a1a82b1fe0d243372679.tar.gz
Fix Dissector bug, protocol SNMP: proto.c:932: failed assertion
From LEGO: DISSECTOR_ASSERT_NOT_REACHED() is a Bug regardless, it is triggered because we are proto_add_item()ing an FT_UINT32 of 5 bytes in length. IF-MIB:ifInOctets is a Counter32 so the value should (and is) application encoded using tag 41. the value's value (!) is H'00d49e69fa (D'3567151610). the assertion is triggered because there's an error in oids.c:59 where states the ft_type as being an FT_UINT32 with a length of 1 to 4 bytes, It should be FT_UINT64 and the length from 1 to 5 bytes considering that integers bigger than 2^31 will be ber encoded in 5 bytes. http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2468 svn path=/trunk/; revision=25148
Diffstat (limited to 'epan/oids.c')
-rw-r--r--epan/oids.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/oids.c b/epan/oids.c
index 383740e4a4..17b65983c7 100644
--- a/epan/oids.c
+++ b/epan/oids.c
@@ -56,7 +56,7 @@ static const oid_value_type_t integer_type = { FT_INT32, BASE_DEC, BER_CLAS
static const oid_value_type_t bytes_type = { FT_BYTES, BASE_NONE, BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, 0, -1, OID_KEY_TYPE_BYTES, 0};
static const oid_value_type_t oid_type = { FT_OID, BASE_NONE, BER_CLASS_UNI, BER_UNI_TAG_OID, 1, -1, OID_KEY_TYPE_OID, 0};
static const oid_value_type_t ipv4_type = { FT_IPv4, BASE_NONE, BER_CLASS_APP, 0, 4, 4, OID_KEY_TYPE_IPADDR, 4};
-static const oid_value_type_t counter32_type = { FT_UINT32, BASE_DEC, BER_CLASS_APP, 1, 1, 4, OID_KEY_TYPE_INTEGER, 1};
+static const oid_value_type_t counter32_type = { FT_UINT64, BASE_DEC, BER_CLASS_APP, 1, 1, 5, OID_KEY_TYPE_INTEGER, 1};
static const oid_value_type_t unsigned32_type = { FT_UINT32, BASE_DEC, BER_CLASS_APP, 2, 1, 4, OID_KEY_TYPE_INTEGER, 1};
/*static const oid_value_type_t timeticks_type = { FT_UINT32, BASE_DEC, BER_CLASS_APP, 3, 1, 4, OID_KEY_TYPE_INTEGER, 1};
* TimeTicks ::= [APPLICATION 3] IMPLICIT INTEGER (0..4294967295)