summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-smb2.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-smb2.c')
-rw-r--r--epan/dissectors/packet-smb2.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/epan/dissectors/packet-smb2.c b/epan/dissectors/packet-smb2.c
index 6dbf0e4..55acb2a 100644
--- a/epan/dissectors/packet-smb2.c
+++ b/epan/dissectors/packet-smb2.c
@@ -3843,6 +3843,7 @@ dissect_smb2_STATUS_STOPPED_ON_SYMLINK(tvbuff_t *tvb, packet_info *pinfo _U_, pr
}
static int
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_smb2_error_context(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *parent_tree, int offset, smb2_info_t *si _U_)
{
proto_tree *tree;
@@ -3871,6 +3872,7 @@ dissect_smb2_error_context(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *pa
* Assumes it is being called with a sub-tvb (dissects at offsets 0)
*/
static void
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_smb2_error_data(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *parent_tree,
int error_context_count, int error_id,
smb2_info_t *si _U_)
@@ -3901,8 +3903,11 @@ dissect_smb2_error_data(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *paren
break;
}
} else {
- for (i = 0; i < error_context_count; i++)
+ increment_dissection_depth(pinfo);
+ for (i = 0; i < error_context_count; i++) {
offset += dissect_smb2_error_context(tvb, pinfo, tree, offset, si);
+ }
+ decrement_dissection_depth(pinfo);
}
}
@@ -7212,6 +7217,7 @@ dissect_windows_sockaddr_storage(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
#define NETWORK_INTERFACE_CAP_RDMA 0x00000002
static void
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_smb2_NETWORK_INTERFACE_INFO(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
{
guint32 next_offset;
@@ -7293,7 +7299,9 @@ dissect_smb2_NETWORK_INTERFACE_INFO(tvbuff_t *tvb, packet_info *pinfo, proto_tre
next_tvb = tvb_new_subset_remaining(tvb, next_offset);
/* next extra info */
+ increment_dissection_depth(pinfo);
dissect_smb2_NETWORK_INTERFACE_INFO(next_tvb, pinfo, parent_tree);
+ decrement_dissection_depth(pinfo);
}
}
@@ -9102,6 +9110,7 @@ get_create_context_data_tag_dissectors(const char *tag)
}
static void
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_smb2_create_extra_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, smb2_info_t *si)
{
offset_length_buffer_t tag_olb;
@@ -9177,7 +9186,9 @@ dissect_smb2_create_extra_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pa
chain_tvb = tvb_new_subset_remaining(tvb, chain_offset);
/* next extra info */
+ increment_dissection_depth(pinfo);
dissect_smb2_create_extra_info(chain_tvb, pinfo, parent_tree, si);
+ decrement_dissection_depth(pinfo);
}
}
@@ -10958,6 +10969,7 @@ dissect_smb2_signature(packet_info *pinfo, tvbuff_t *tvb, int offset, proto_tree
}
static int
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_smb2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, gboolean first_in_chain)
{
int msg_type;
@@ -11001,6 +11013,8 @@ dissect_smb2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, gboolea
break;
}
+ increment_dissection_depth(pinfo);
+
/* find which conversation we are part of and get the data for that
* conversation
*/
@@ -11315,6 +11329,7 @@ dissect_smb2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, gboolea
offset = dissect_smb2(next_tvb, pinfo, parent_tree, FALSE);
}
+ decrement_dissection_depth(pinfo);
return offset;
}