summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-s7comm.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-s7comm.c')
-rw-r--r--epan/dissectors/packet-s7comm.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/epan/dissectors/packet-s7comm.c b/epan/dissectors/packet-s7comm.c
index de55b83..5eeac7f 100644
--- a/epan/dissectors/packet-s7comm.c
+++ b/epan/dissectors/packet-s7comm.c
@@ -4252,6 +4252,7 @@ s7comm_decode_ud_tis_param(tvbuff_t *tvb,
*
*******************************************************************************************************/
static guint32
+// NOLINTNEXTLINE(misc-no-recursion)
s7comm_decode_ud_tis_jobs(tvbuff_t *tvb,
proto_tree *td_tree,
guint16 td_size,
@@ -4309,6 +4310,7 @@ s7comm_decode_ud_tis_jobs(tvbuff_t *tvb,
}
/* New job data tree */
if (job_td_size > 0) {
+ // We recurse here, but we'll run out of packet before we run out of stack.
offset = s7comm_decode_ud_tis_data(tvb, td_tree, S7COMM_UD_TYPE_REQ, job_subfunc, job_td_size, offset);
}
break;
@@ -5122,6 +5124,7 @@ s7comm_decode_ud_tis_breakpoint(tvbuff_t *tvb,
*
*******************************************************************************************************/
static guint32
+// NOLINTNEXTLINE(misc-no-recursion)
s7comm_decode_ud_tis_data(tvbuff_t *tvb,
proto_tree *tree,
guint8 type,
@@ -5164,6 +5167,7 @@ s7comm_decode_ud_tis_data(tvbuff_t *tvb,
case S7COMM_UD_SUBF_TIS_READJOBLIST:
case S7COMM_UD_SUBF_TIS_READJOB:
case S7COMM_UD_SUBF_TIS_REPLACEJOB:
+ // We recurse here, but we'll run out of packet before we run out of stack.
offset = s7comm_decode_ud_tis_jobs(tvb, td_tree, td_size, type, subfunc, offset);
break;
case S7COMM_UD_SUBF_TIS_MODVAR:
@@ -8567,11 +8571,7 @@ proto_register_s7comm (void)
&ett_s7comm_fragment,
};
- proto_s7comm = proto_register_protocol (
- "S7 Communication", /* name */
- "S7COMM", /* short name */
- "s7comm" /* abbrev */
- );
+ proto_s7comm = proto_register_protocol ("S7 Communication", "S7COMM", "s7comm");
proto_register_field_array(proto_s7comm, hf, array_length (hf));