summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-pim.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-pim.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-pim.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/epan/dissectors/packet-pim.c b/epan/dissectors/packet-pim.c
index 1277cbbd..7c9ac399 100644
--- a/epan/dissectors/packet-pim.c
+++ b/epan/dissectors/packet-pim.c
@@ -759,6 +759,7 @@ dissect_pimv1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U
}
static gboolean
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_pim_addr(packet_info *pinfo, proto_tree* tree, tvbuff_t *tvb, int offset, enum pimv2_addrtype at,
const char* label, proto_item** ret_item, int hf_ip4, int hf_ip6, int *advance) {
guint8 af, et, flags, mask_len, ja_af;
@@ -1011,6 +1012,7 @@ dissect_pim_addr(packet_info *pinfo, proto_tree* tree, tvbuff_t *tvb, int offset
case PIM_JOIN_ATTRIBUTE_TYPE_RPF:
if ((ja_length == 6) || (ja_length == 18)) {
int advance_attr;
+ // We recurse here, but we'll run out of packet before we run out of stack.
if (!dissect_pim_addr(pinfo, ja_tree, tvb, ja_offset, pimv2_unicast, NULL, NULL,
hf_pim_unicast_addr_ipv4, hf_pim_unicast_addr_ipv6, &advance_attr))
break;
@@ -2292,8 +2294,7 @@ proto_register_pim(void)
expert_module_t* expert_pim;
module_t *pim_module;
- proto_pim = proto_register_protocol("Protocol Independent Multicast",
- "PIM", "pim");
+ proto_pim = proto_register_protocol("Protocol Independent Multicast", "PIM", "pim");
proto_register_field_array(proto_pim, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
expert_pim = expert_register_protocol(proto_pim);