diff options
Diffstat (limited to '')
-rw-r--r-- | epan/dissectors/packet-edonkey.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/epan/dissectors/packet-edonkey.c b/epan/dissectors/packet-edonkey.c index 3cb1a64f..8e338abe 100644 --- a/epan/dissectors/packet-edonkey.c +++ b/epan/dissectors/packet-edonkey.c @@ -1653,6 +1653,7 @@ static int dissect_kademlia2_peer(tvbuff_t *tvb, packet_info *pinfo, /* Dissects the eDonkey search query */ +// NOLINTNEXTLINE(misc-no-recursion) static int dissect_edonkey_search_query(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tree) { @@ -1668,6 +1669,7 @@ static int dissect_edonkey_search_query(tvbuff_t *tvb, packet_info *pinfo, search_length = 1; ti = proto_tree_add_uint(tree, hf_edonkey_search_type, tvb, offset, 1, search_type); + increment_dissection_depth(pinfo); switch (search_type) { case EDONKEY_SEARCH_BOOL: @@ -1752,6 +1754,7 @@ static int dissect_edonkey_search_query(tvbuff_t *tvb, packet_info *pinfo, offset += search_length; break; } + decrement_dissection_depth(pinfo); return offset; } @@ -2507,6 +2510,7 @@ static int dissect_kademlia_search_result(tvbuff_t *tvb, packet_info *pinfo, return dissect_kademlia_taglist( tvb, pinfo, offset, tree ); } +// NOLINTNEXTLINE(misc-no-recursion) static int dissect_kademlia_search_expression_tree(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tree) { @@ -2518,6 +2522,7 @@ static int dissect_kademlia_search_expression_tree(tvbuff_t *tvb, packet_info *p ti = proto_tree_add_uint(tree, hf_kademlia_search_expression_type, tvb, offset, 1, op); tree = proto_item_add_subtree( ti, ett_kademlia_search_expression ); ++offset; + increment_dissection_depth(pinfo); switch( op ) { case 0: /* Bool op */ proto_tree_add_item(tree, hf_kademlia_search_bool_op, tvb, offset, 1, ENC_NA ); @@ -2553,6 +2558,7 @@ static int dissect_kademlia_search_expression_tree(tvbuff_t *tvb, packet_info *p default: expert_add_info_format(pinfo, ti, &ei_kademlia_search_expression_type, "NOT DECODED op %x", op ); } + decrement_dissection_depth(pinfo); proto_item_set_len( ti, offset - item_start_offset ); return offset; } |