summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-cose.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-26 17:44:17 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-26 17:44:17 +0000
commit2d78050fd56b8188aa5a65ad2667e301b60eea45 (patch)
treeb54d4adac6de0a196b8bb8a67b34fe186c21378f /epan/dissectors/packet-cose.c
parentAdding upstream version 4.2.2. (diff)
downloadwireshark-2d78050fd56b8188aa5a65ad2667e301b60eea45.tar.xz
wireshark-2d78050fd56b8188aa5a65ad2667e301b60eea45.zip
Adding upstream version 4.2.4.upstream/4.2.4
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'epan/dissectors/packet-cose.c')
-rw-r--r--epan/dissectors/packet-cose.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/epan/dissectors/packet-cose.c b/epan/dissectors/packet-cose.c
index 5f5a7e6e..2637c1fa 100644
--- a/epan/dissectors/packet-cose.c
+++ b/epan/dissectors/packet-cose.c
@@ -558,6 +558,8 @@ static void dissect_ciphertext(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
}
}
static void dissect_cose_recipient(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint *offset);
+
+// NOLINTNEXTLINE(misc-no-recursion)
static void dissect_cose_recipient_list(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint *offset) {
wscbor_chunk_t *chunk_list = wscbor_chunk_read(pinfo->pool, tvb, offset);
wscbor_require_array(chunk_list);
@@ -571,6 +573,8 @@ static void dissect_cose_recipient_list(tvbuff_t *tvb, packet_info *pinfo, proto
}
proto_item_set_len(item_list, *offset - chunk_list->start);
}
+
+// NOLINTNEXTLINE(misc-no-recursion)
static void dissect_cose_recipient(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint *offset) {
wscbor_chunk_t *chunk_recip = wscbor_chunk_read(pinfo->pool, tvb, offset);
wscbor_require_array_size(chunk_recip, 3, 4);
@@ -581,7 +585,9 @@ static void dissect_cose_recipient(tvbuff_t *tvb, packet_info *pinfo, proto_tree
dissect_headers(tvb, pinfo, tree_recip, offset);
dissect_ciphertext(tvb, pinfo, tree_recip, offset);
if (chunk_recip->head_value > 3) {
+ increment_dissection_depth(pinfo);
dissect_cose_recipient_list(tvb, pinfo, tree_recip, offset);
+ decrement_dissection_depth(pinfo);
}
}
proto_item_set_len(item_recip, *offset - chunk_recip->start);