aboutsummaryrefslogtreecommitdiffstats
path: root/debian
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-01-08 18:25:26 -0800
committerGuy Harris <guy@alum.mit.edu>2016-01-09 02:26:06 +0000
commitc67c6e8f30b02450de2d9fb02b91026c5f954448 (patch)
treeb2fc637a2e893fe3daaec25718603d529f41e6dc /debian
parent628c068a94fd8c4ebb36670637ed83f6dad80223 (diff)
Add routines to add an item and return the item's real length.
proto_item_get_len() is *not* guaranteed to return a correct value. Even if there's a non-null tree item, it might be pointing to a "faked" item; it really shouldn't be used. So add proto_tree_add_item_ret_length() and proto_tree_add_item_new_ret_length(), which calculate the real length themselves and return it through a pointer. Fix as many places as we straightforwardly can to use them rather than to use proto_item_get_len(). (There's a Lua API for proto_item_get_len(), so we keep it around, but we should add Lua APIs for the new routines, and deprecate the old API.) Fix ptvcursor_add() to do the same thing that proto_tree_add_item_ret_length() and proto_tree_add_item_new_ret_length() do. Split the TRY_TO_FAKE_THIS_ITEM macros into a macro to check for the tree being null and to try to fake the item. We don't always use the former macro, as we might need to do more than just return NULL if the incoming tree is null (for example, calculating the item's real length and using it...). new_field_info() never returns NULL; remove checks for it. The check for a null tree is done before the calls to new_field_info(). Change-Id: I002a218d1f810c73e0de837e0ac6ebcde21bacec Reviewed-on: https://code.wireshark.org/review/13139 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'debian')
-rw-r--r--debian/libwireshark0.symbols2
1 files changed, 2 insertions, 0 deletions
diff --git a/debian/libwireshark0.symbols b/debian/libwireshark0.symbols
index a55dfdd0cc..7ced7b4469 100644
--- a/debian/libwireshark0.symbols
+++ b/debian/libwireshark0.symbols
@@ -1055,7 +1055,9 @@ libwireshark.so.0 libwireshark0 #MINVER#
proto_tree_add_ipxnet_format_value@Base 1.9.1
proto_tree_add_item@Base 1.9.1
proto_tree_add_item_new@Base 1.12.0~rc1
+ proto_tree_add_item_new_ret_length@Base 2.1.0
proto_tree_add_item_ret_int@Base 1.99.6
+ proto_tree_add_item_ret_length@Base 2.1.0
proto_tree_add_item_ret_uint@Base 1.99.6
proto_tree_add_none_format@Base 1.9.1
proto_tree_add_protocol_format@Base 1.9.1