summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-x509sat.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-26 17:44:18 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-26 17:44:18 +0000
commit1da76b3706a6c9bd41bf8f219d7c97de5e1e5c7f (patch)
tree9930fb4bb87cd6037f60efff9656f967121c8c2d /epan/dissectors/packet-x509sat.c
parentAdding debian version 4.2.2-1.1. (diff)
downloadwireshark-1da76b3706a6c9bd41bf8f219d7c97de5e1e5c7f.tar.xz
wireshark-1da76b3706a6c9bd41bf8f219d7c97de5e1e5c7f.zip
Merging upstream version 4.2.4.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'epan/dissectors/packet-x509sat.c')
-rw-r--r--epan/dissectors/packet-x509sat.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/epan/dissectors/packet-x509sat.c b/epan/dissectors/packet-x509sat.c
index 6704d950..260e1d5f 100644
--- a/epan/dissectors/packet-x509sat.c
+++ b/epan/dissectors/packet-x509sat.c
@@ -258,7 +258,6 @@ static gint ett_x509sat_LocaleContextSyntax = -1;
/*int dissect_x509sat_Criteria(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
@@ -433,16 +432,15 @@ static const ber_choice_t Criteria_choice[] = {
int
dissect_x509sat_Criteria(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);
+ // Criteria → Criteria/and → Criteria
+ actx->pinfo->dissection_depth += 2;
+ increment_dissection_depth(actx->pinfo);
offset = dissect_ber_choice(actx, tree, tvb, offset,
Criteria_choice, hf_index, ett_x509sat_Criteria,
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;
}