From Sean Van Gorder:
authoretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 5 Jun 2011 20:12:44 +0000 (20:12 +0000)
committeretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 5 Jun 2011 20:12:44 +0000 (20:12 +0000)
When Wireshark attempts to read an SNMP packet with a variable-bindings item
with an OID containing an index string which includes an entry of type
"Unsigned32", Wireshark will stop dissecting the packet at this index entry and
end with the error:

[Dissector bug, protocol SNMP: proto.c:2761: failed assertion
"DISSECTOR_ASSERT_NOT_REACHED"]

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5883

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37558 f5534014-38df-0310-8fa8-9805f1628bb7

asn1/snmp/packet-snmp-template.c
epan/dissectors/packet-snmp.c

index 959008cfb54fce9c27ff7a451d75855d16333a60..9d3746ff16c06eebd5a16020303a9c6be78f8eaf 100644 (file)
@@ -588,7 +588,7 @@ dissect_snmp_VarBind(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,
                                                                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]);
+                                                                       proto_tree_add_uint64(pt_name,k->hfid,tvb,name_offset,name_len,(guint)subids[key_start]);
                                                                }
                                                                key_start++;
                                                                key_len--;
index 52284127944a26e16df1085e6fff433e05dc4363..84d0754b669d7d86985244bf878abb8f80ade655 100644 (file)
@@ -690,7 +690,7 @@ dissect_snmp_VarBind(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,
                                                                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]);
+                                                                       proto_tree_add_uint64(pt_name,k->hfid,tvb,name_offset,name_len,(guint)subids[key_start]);
                                                                }
                                                                key_start++;
                                                                key_len--;