mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
Try safe version
This commit is contained in:
parent
e34e396ff9
commit
c7731b32f1
@ -46,9 +46,9 @@ UInt32 CompressionCodecLZ4::doCompressData(const char * source, UInt32 source_si
|
||||
return LZ4_compress_default(source, dest, source_size, LZ4_COMPRESSBOUND(source_size));
|
||||
}
|
||||
|
||||
void CompressionCodecLZ4::doDecompressData(const char * source, UInt32, char * dest, UInt32 uncompressed_size) const
|
||||
void CompressionCodecLZ4::doDecompressData(const char * source, UInt32 source_size, char * dest, UInt32 uncompressed_size) const
|
||||
{
|
||||
if (LZ4_decompress_fast(source, dest, uncompressed_size) < 0)
|
||||
if (LZ4_decompress_safe(source, dest, source_size, uncompressed_size) < 0)
|
||||
throw Exception("Cannot LZ4_decompress_safe", ErrorCodes::CANNOT_DECOMPRESS);
|
||||
// LZ4::decompress(source, dest, source_size, uncompressed_size, lz4_stat);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user