diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-26 17:44:25 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-26 17:44:25 +0000 |
commit | f59ea5f7690c9a01ef6f7f6508084a66c40b1dae (patch) | |
tree | 482ee255d71f113be6c62e9ff3543fd6ebb9f12a /epan/dissectors/packet-ldap.c | |
parent | Releasing progress-linux version 4.2.2-1.1~progress7.99u1. (diff) | |
download | wireshark-f59ea5f7690c9a01ef6f7f6508084a66c40b1dae.tar.xz wireshark-f59ea5f7690c9a01ef6f7f6508084a66c40b1dae.zip |
Merging upstream version 4.2.4.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'epan/dissectors/packet-ldap.c')
-rw-r--r-- | epan/dissectors/packet-ldap.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/epan/dissectors/packet-ldap.c b/epan/dissectors/packet-ldap.c index 1ad9215..42834ce 100644 --- a/epan/dissectors/packet-ldap.c +++ b/epan/dissectors/packet-ldap.c @@ -1115,7 +1115,6 @@ ldap_match_call_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gu static int dissect_ldap_Filter(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); -#define MAX_RECURSION_DEPTH 100 // Arbitrarily chosen. static int @@ -2174,11 +2173,9 @@ static const ber_choice_t Filter_choice[] = { static int dissect_ldap_Filter(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - const int proto_id = GPOINTER_TO_INT(wmem_list_frame_data(wmem_list_tail(actx->pinfo->layers))); - const unsigned cycle_size = 4; - unsigned recursion_depth = p_get_proto_depth(actx->pinfo, proto_id); - DISSECTOR_ASSERT(recursion_depth <= MAX_RECURSION_DEPTH); - p_set_proto_depth(actx->pinfo, proto_id, recursion_depth + cycle_size); + // Filter → Filter/and → Filter/and/_item → Filter + actx->pinfo->dissection_depth += 3; + increment_dissection_depth(actx->pinfo); proto_tree *tr; proto_item *it; attributedesc_string=NULL; @@ -2204,7 +2201,8 @@ dissect_ldap_Filter(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, as proto_item_append_text(it, "%s", string_or_null(Filter_string)); - p_set_proto_depth(actx->pinfo, proto_id, recursion_depth - cycle_size); + actx->pinfo->dissection_depth -= 3; + decrement_dissection_depth(actx->pinfo); return offset; } |