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.
This commit is contained in:
Gerald Combs 2020-12-08 09:00:37 -08:00
parent 7a8a3a8702
commit c7e6b79825
1 changed files with 3 additions and 1 deletions

View File

@ -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)
{