diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-26 17:44:18 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-26 17:44:18 +0000 |
commit | 1da76b3706a6c9bd41bf8f219d7c97de5e1e5c7f (patch) | |
tree | 9930fb4bb87cd6037f60efff9656f967121c8c2d /epan/dissectors/packet-sna.c | |
parent | Adding debian version 4.2.2-1.1. (diff) | |
download | wireshark-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 'epan/dissectors/packet-sna.c')
-rw-r--r-- | epan/dissectors/packet-sna.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/epan/dissectors/packet-sna.c b/epan/dissectors/packet-sna.c index cdf6bfdb..c8a9dab8 100644 --- a/epan/dissectors/packet-sna.c +++ b/epan/dissectors/packet-sna.c @@ -2220,6 +2220,7 @@ dissect_rh(tvbuff_t *tvb, int offset, proto_tree *tree) */ static void +// NOLINTNEXTLINE(misc-no-recursion) dissect_control_05hpr(tvbuff_t *tvb, proto_tree *tree, int hpr, enum parse parse) { @@ -2246,6 +2247,7 @@ dissect_control_05hpr(tvbuff_t *tvb, proto_tree *tree, int hpr, len = tvb_get_guint8(tvb, offset+1); } if (len) { + // We recurse here, but we'll run out of packet before we run out of stack. dissect_sna_control(tvb, offset, len, tree, hpr, parse); pad = (len+3) & 0xfffc; if (pad > len) { @@ -2285,6 +2287,7 @@ dissect_control_0e(tvbuff_t *tvb, proto_tree *tree) } static void +// NOLINTNEXTLINE(misc-no-recursion) dissect_sna_control(tvbuff_t *parent_tvb, int offset, int control_len, proto_tree *tree, int hpr, enum parse parse) { @@ -2351,6 +2354,7 @@ dissect_sna_control(tvbuff_t *parent_tvb, int offset, int control_len, switch(key) { case 0x05: if (hpr) + // We recurse here, but we'll run out of packet before we run out of stack. dissect_control_05hpr(tvb, sub_tree, hpr, parse); else @@ -3447,8 +3451,7 @@ proto_register_sna(void) }; module_t *sna_module; - proto_sna = proto_register_protocol("Systems Network Architecture", - "SNA", "sna"); + proto_sna = proto_register_protocol("Systems Network Architecture", "SNA", "sna"); proto_register_field_array(proto_sna, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); sna_handle = register_dissector("sna", dissect_sna, proto_sna); |