summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-kafka.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-kafka.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 'epan/dissectors/packet-kafka.c')
-rw-r--r--epan/dissectors/packet-kafka.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/epan/dissectors/packet-kafka.c b/epan/dissectors/packet-kafka.c
index 798f1c95..482a6701 100644
--- a/epan/dissectors/packet-kafka.c
+++ b/epan/dissectors/packet-kafka.c
@@ -1907,6 +1907,7 @@ decompress(tvbuff_t *tvb, packet_info *pinfo, int offset, guint32 length, int co
* returns: pointer to the next message/batch
*/
static int
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_kafka_message_old(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, int end_offset _U_)
{
proto_item *message_ti;
@@ -2000,6 +2001,7 @@ dissect_kafka_message_old(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, i
* returns: pointer to the next message/batch
*/
static int
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_kafka_message_new(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, int end_offset _U_)
{
proto_item *batch_ti;
@@ -2073,6 +2075,7 @@ dissect_kafka_message_new(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, i
}
static int
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_kafka_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, int end_offset)
{
gint8 magic_byte;
@@ -2093,14 +2096,19 @@ dissect_kafka_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int o
}
magic_byte = tvb_get_guint8(tvb, offset + 16);
+ int message_offset = 0;
+ increment_dissection_depth(pinfo);
if (magic_byte < 2) {
- return dissect_kafka_message_old(tvb, pinfo, tree, offset, end_offset);
+ message_offset = dissect_kafka_message_old(tvb, pinfo, tree, offset, end_offset);
} else {
- return dissect_kafka_message_new(tvb, pinfo, tree, offset, end_offset);
+ message_offset = dissect_kafka_message_new(tvb, pinfo, tree, offset, end_offset);
}
+ decrement_dissection_depth(pinfo);
+ return message_offset;
}
static int
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_kafka_message_set(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint offset, guint len, guint8 codec)
{
proto_item *ti;