AMQP: workaround some proto_tree_add_none_format() asserts
Previously proto_tree_add_none_format() could be called with any type of field type, not FT_NONE only. Change-Id: I78976a168fc1bf606b72ad38d284bb0bd1794b03 Ping-Bug: 13780 Reviewed-on: https://code.wireshark.org/review/22243 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
parent
59f15b2a3a
commit
2de483c092
|
@ -5927,13 +5927,13 @@ dissect_amqp_1_0_list(tvbuff_t *tvb,
|
|||
return 0;
|
||||
}
|
||||
|
||||
list_tree = proto_tree_add_none_format(item,
|
||||
hf_amqp_type,
|
||||
tvb,
|
||||
offset-1,
|
||||
element_size+1+count_len,
|
||||
"%s",
|
||||
name ? name : proto_registrar_get_name(hf_amqp_type));
|
||||
list_tree = proto_tree_add_item(item,
|
||||
hf_amqp_type,
|
||||
tvb,
|
||||
offset-1,
|
||||
element_size+1+count_len,
|
||||
ENC_BIG_ENDIAN);
|
||||
proto_item_set_text(list_tree, "%s", name ? name : proto_registrar_get_name(hf_amqp_type));
|
||||
offset += (count_len*2);
|
||||
|
||||
if (element_count > 0)
|
||||
|
@ -6177,13 +6177,13 @@ dissect_amqp_1_0_array(tvbuff_t *tvb,
|
|||
&hf_amqp_subtypes_array,
|
||||
&decoded_element_size);
|
||||
|
||||
array_tree = proto_tree_add_none_format(item,
|
||||
hf_amqp_type,
|
||||
tvb,
|
||||
offset-1,
|
||||
element_size+1+count_len,
|
||||
"%s",
|
||||
name ? name : proto_registrar_get_name(hf_amqp_type));
|
||||
array_tree = proto_tree_add_item(item,
|
||||
hf_amqp_type,
|
||||
tvb,
|
||||
offset-1,
|
||||
element_size+1+count_len,
|
||||
ENC_BIG_ENDIAN);
|
||||
proto_item_set_text(array_tree, "%s", name ? name : proto_registrar_get_name(hf_amqp_type));
|
||||
offset += (count_len*2+decoded_element_size);
|
||||
|
||||
if (element_count > 0)
|
||||
|
|
Loading…
Reference in New Issue