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-disp.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 '')
-rw-r--r-- | epan/dissectors/packet-disp.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/epan/dissectors/packet-disp.c b/epan/dissectors/packet-disp.c index 7d206fb0..61325352 100644 --- a/epan/dissectors/packet-disp.c +++ b/epan/dissectors/packet-disp.c @@ -232,7 +232,6 @@ static int dissect_disp_Subtree(bool implicit_tag _U_, tvbuff_t *tvb _U_, int of static int dissect_disp_IncrementalStepRefresh(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 @@ -1042,15 +1041,14 @@ static const ber_sequence_t Subtree_sequence[] = { static int dissect_disp_Subtree(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); + // Subtree → Subtree/subtree → Subtree + actx->pinfo->dissection_depth += 2; + increment_dissection_depth(actx->pinfo); offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, Subtree_sequence, hf_index, ett_disp_Subtree); - p_set_proto_depth(actx->pinfo, proto_id, recursion_depth - cycle_size); + actx->pinfo->dissection_depth -= 2; + decrement_dissection_depth(actx->pinfo); return offset; } @@ -1206,15 +1204,14 @@ static const ber_sequence_t IncrementalStepRefresh_sequence[] = { static int dissect_disp_IncrementalStepRefresh(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); + // IncrementalStepRefresh → IncrementalStepRefresh/subordinateUpdates → SubordinateChanges → IncrementalStepRefresh + actx->pinfo->dissection_depth += 3; + increment_dissection_depth(actx->pinfo); offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, IncrementalStepRefresh_sequence, hf_index, ett_disp_IncrementalStepRefresh); - p_set_proto_depth(actx->pinfo, proto_id, recursion_depth - cycle_size); + actx->pinfo->dissection_depth -= 3; + decrement_dissection_depth(actx->pinfo); return offset; } |