Fix -1 lengths in proto_tree_add_item_ret_string_and_length().
authorEtienne Dechamps <etienne@edechamps.fr>
Sun, 20 Nov 2016 18:37:19 +0000 (18:37 +0000)
committerAlexis La Goutte <alexis.lagoutte@gmail.com>
Mon, 21 Nov 2016 09:52:47 +0000 (09:52 +0000)
commit3bf6a189994475a5a1a82bb518e7fdd047cc7777
tree4f730b7c8df8b170e6baa5702b4363d0a8644824
parent035e404fff4ce11348fc0e019a368ddd080a1266
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>
epan/proto.c