Currently, when passing a -1 length to proto_tree_add_item_ret_string_and_length() or
proto_tree_add_item_ret_string(), the -1 length will be passed directly
to the field info. The calculated length should be used instead.
Bug: 13159
Change-Id: I980d18fb9bde3c452e64a8735e62d4830ce53b64
Reviewed-on: https://code.wireshark.org/review/18904
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
TRY_TO_FAKE_THIS_ITEM(tree, hfinfo->id, hfinfo);
- new_fi = new_field_info(tree, hfinfo, tvb, start, length);
+ new_fi = new_field_info(tree, hfinfo, tvb, start, *lenretval);
proto_tree_set_string(new_fi, value);