diff options
author | Etienne Dechamps <etienne@edechamps.fr> | 2016-11-20 18:37:19 +0000 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2016-11-21 09:52:47 +0000 |
commit | 3bf6a189994475a5a1a82bb518e7fdd047cc7777 (patch) | |
tree | 4f730b7c8df8b170e6baa5702b4363d0a8644824 /epan | |
parent | 035e404fff4ce11348fc0e019a368ddd080a1266 (diff) |
Fix -1 lengths in proto_tree_add_item_ret_string_and_length().
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>
Diffstat (limited to 'epan')
-rw-r--r-- | epan/proto.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/proto.c b/epan/proto.c index 8ddb971298..cfd137d083 100644 --- a/epan/proto.c +++ b/epan/proto.c @@ -2448,7 +2448,7 @@ proto_tree_add_item_ret_string_and_length(proto_tree *tree, int hfindex, 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); |