diff options
author | Gerald Combs <gerald@wireshark.org> | 2020-12-08 09:00:37 -0800 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2020-12-08 21:28:56 +0000 |
commit | c7e6b798255e9d78d88abb84b951ca7815e0f880 (patch) | |
tree | c2f767d3a97b582a104805188c934ff6e5eef27d /epan/dissectors/packet-kafka.c | |
parent | 7a8a3a8702d8f5c5b33173d0598ecb0cf0a1df34 (diff) |
Kafka: Decrease our maximum decompression buffer size.
https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/common/record/KafkaLZ4BlockOutputStream.java
maxes out at 2^22, so use that.
Diffstat (limited to 'epan/dissectors/packet-kafka.c')
-rw-r--r-- | epan/dissectors/packet-kafka.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/epan/dissectors/packet-kafka.c b/epan/dissectors/packet-kafka.c index 9ecd557961..1e97f2ae03 100644 --- a/epan/dissectors/packet-kafka.c +++ b/epan/dissectors/packet-kafka.c @@ -1864,7 +1864,9 @@ decompress_zstd(tvbuff_t *tvb _U_, packet_info *pinfo, int offset _U_, guint32 l } #endif /* HAVE_ZSTD */ -#define MAX_DECOMPRESSION_SIZE (50 * 1000 * 1000) // Arbitrary +// Max is currently 2^22 in +// https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/common/record/KafkaLZ4BlockOutputStream.java +#define MAX_DECOMPRESSION_SIZE (1 << 22) static gboolean decompress(tvbuff_t *tvb, packet_info *pinfo, int offset, guint32 length, int codec, tvbuff_t **decompressed_tvb, int *decompressed_offset) { |