Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-bugs: [Wireshark-bugs] [Bug 2468] Dissector bug, protocol SNMP: proto.c:932: failed as

Date: Tue, 22 Apr 2008 08:24:42 -0700 (PDT)
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2468





--- Comment #3 from LEGO <luis.ontanon@xxxxxxxxx>  2008-04-22 08:24:42 GMT ---

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.

Fix:

static const oid_value_type_t counter32_type =  { FT_UINT32, BASE_DEC, 
BER_CLASS_APP, 1,                       1,   4, OID_KEY_TYPE_INTEGER, 1};

should become

static const oid_value_type_t counter32_type =  { FT_UINT64, BASE_DEC, 
BER_CLASS_APP, 1,                       1,   5, OID_KEY_TYPE_INTEGER, 1};


I'd be checking in this change not earlier than tomorrow unless someone beats
me to it.

L


-- 
Configure bugmail: http://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.