summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ieee1609dot2.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--epan/dissectors/packet-ieee1609dot2.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/epan/dissectors/packet-ieee1609dot2.c b/epan/dissectors/packet-ieee1609dot2.c
index 9675333e..2c06c97e 100644
--- a/epan/dissectors/packet-ieee1609dot2.c
+++ b/epan/dissectors/packet-ieee1609dot2.c
@@ -427,7 +427,6 @@ ieee1609dot2_set_next_default_psid(packet_info *pinfo, guint32 psid)
static int dissect_ieee1609dot2_Ieee1609Dot2Data(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
@@ -3024,16 +3023,15 @@ static const oer_sequence_t Ieee1609Dot2Data_sequence[] = {
static int
dissect_ieee1609dot2_Ieee1609Dot2Data(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 = 6;
- 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);
+ // Ieee1609Dot2Data → Ieee1609Dot2Content → SignedData → ToBeSignedData → SignedDataPayload → Ieee1609Dot2Data
+ actx->pinfo->dissection_depth += 5;
+ increment_dissection_depth(actx->pinfo);
actx->private_data = (void*)wmem_new0(actx->pinfo->pool, ieee1609_private_data_t);
offset = dissect_oer_sequence(tvb, offset, actx, tree, hf_index,
ett_ieee1609dot2_Ieee1609Dot2Data, Ieee1609Dot2Data_sequence);
- p_set_proto_depth(actx->pinfo, proto_id, recursion_depth - cycle_size);
+ actx->pinfo->dissection_depth -= 5;
+ decrement_dissection_depth(actx->pinfo);
return offset;
}