diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-26 17:44:17 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-26 17:44:17 +0000 |
commit | 2d78050fd56b8188aa5a65ad2667e301b60eea45 (patch) | |
tree | b54d4adac6de0a196b8bb8a67b34fe186c21378f /epan/dissectors/packet-goose.c | |
parent | Adding upstream version 4.2.2. (diff) | |
download | wireshark-2d78050fd56b8188aa5a65ad2667e301b60eea45.tar.xz wireshark-2d78050fd56b8188aa5a65ad2667e301b60eea45.zip |
Adding upstream version 4.2.4.upstream/4.2.4
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'epan/dissectors/packet-goose.c')
-rw-r--r-- | epan/dissectors/packet-goose.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/epan/dissectors/packet-goose.c b/epan/dissectors/packet-goose.c index 2eb45619..b11f8a46 100644 --- a/epan/dissectors/packet-goose.c +++ b/epan/dissectors/packet-goose.c @@ -187,7 +187,6 @@ static gint ett_goose_Data = -1; static int dissect_goose_Data(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 @@ -711,16 +710,15 @@ static const ber_choice_t Data_choice[] = { static int dissect_goose_Data(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 = 3; - 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); + // Data → Data/array → Data + actx->pinfo->dissection_depth += 2; + increment_dissection_depth(actx->pinfo); offset = dissect_ber_choice(actx, tree, tvb, offset, Data_choice, hf_index, ett_goose_Data, NULL); - p_set_proto_depth(actx->pinfo, proto_id, recursion_depth - cycle_size); + actx->pinfo->dissection_depth -= 2; + decrement_dissection_depth(actx->pinfo); return offset; } |