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
This commit is contained in:
Anders Broman 2008-04-22 19:31:03 +00:00
parent a0866910ef
commit 1d5cb5ff64
1 changed files with 1 additions and 1 deletions

View File

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