aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2021-12-29 09:48:55 -0800
committerGerald Combs <gerald@wireshark.org>2021-12-29 09:49:49 -0800
commit3c0198492dd8433f8bbc8ef0053e3624ddb7fb67 (patch)
tree00c80f8d82551cb86c200489bb6300c64f7acb02
parent5800b65a81a2f74b7d28bed02c730ba5d11325bd (diff)
Kafka: Add back some code.
a03f43645d removed some code that set offset and length parameters. Add it back.
-rw-r--r--epan/dissectors/packet-kafka.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/epan/dissectors/packet-kafka.c b/epan/dissectors/packet-kafka.c
index 41cfdf33c1..6591ef702d 100644
--- a/epan/dissectors/packet-kafka.c
+++ b/epan/dissectors/packet-kafka.c
@@ -1140,6 +1140,12 @@ dissect_kafka_compact_string(proto_tree *tree, int hf_item, tvbuff_t *tvb, packe
if (len == 0) {
pi = proto_tree_add_item(tree, hf_item, tvb, offset, 0, ENC_NA);
expert_add_info(pinfo, pi, &ei_kafka_bad_varint);
+ if (p_offset) {
+ *p_offset = 0;
+ }
+ if (p_length) {
+ *p_length = 0;
+ }
return tvb_captured_length(tvb);
}
@@ -1231,6 +1237,12 @@ dissect_kafka_compact_bytes(proto_tree *tree, int hf_item, tvbuff_t *tvb, packet
if (len == 0) {
pi = proto_tree_add_item(tree, hf_item, tvb, offset, 0, ENC_NA);
expert_add_info(pinfo, pi, &ei_kafka_bad_varint);
+ if (p_offset) {
+ *p_offset = 0;
+ }
+ if (p_length) {
+ *p_length = 0;
+ }
return tvb_captured_length(tvb);
}
@@ -2138,6 +2150,12 @@ dissect_kafka_tagged_field_data(proto_tree *tree, int hf_item, tvbuff_t *tvb, pa
pi = proto_tree_add_item(tree, hf_item, tvb, offset+len, (gint)length, ENC_NA);
if (len == 0) {
expert_add_info(pinfo, pi, &ei_kafka_bad_varint);
+ if (p_offset) {
+ *p_offset = 0;
+ }
+ if (p_len) {
+ *p_len = 0;
+ }
return tvb_captured_length(tvb);
}