diff options
Diffstat (limited to 'epan/dissectors/packet-h248.c')
-rw-r--r-- | epan/dissectors/packet-h248.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/epan/dissectors/packet-h248.c b/epan/dissectors/packet-h248.c index ca5f4192..d1799fed 100644 --- a/epan/dissectors/packet-h248.c +++ b/epan/dissectors/packet-h248.c @@ -2619,7 +2619,6 @@ static int dissect_h248_MtpAddress(bool implicit_tag, tvbuff_t *tvb, int offset, static int dissect_h248_SecondEventsDescriptor(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 @@ -4248,15 +4247,14 @@ static const ber_sequence_t SecondEventsDescriptor_sequence[] = { static int dissect_h248_SecondEventsDescriptor(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 = 7; - 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); + // SecondEventsDescriptor → SecondEventsDescriptor/eventList → SecondRequestedEvent → SecondRequestedActions → NotifyBehaviour → RegulatedEmbeddedDescriptor → SecondEventsDescriptor + actx->pinfo->dissection_depth += 6; + increment_dissection_depth(actx->pinfo); offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, SecondEventsDescriptor_sequence, hf_index, ett_h248_SecondEventsDescriptor); - p_set_proto_depth(actx->pinfo, proto_id, recursion_depth - cycle_size); + actx->pinfo->dissection_depth -= 6; + decrement_dissection_depth(actx->pinfo); return offset; } |