summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-h248.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-h248.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 '')
-rw-r--r--epan/dissectors/packet-h248.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/epan/dissectors/packet-h248.c b/epan/dissectors/packet-h248.c
index ca5f419..d1799fe 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;
}