Commit 03ce292a authored by Nick Terrell's avatar Nick Terrell Committed by Facebook Github Bot

Fix std::max() call in Compression.cpp

Summary:
`std::max(uint64_t, size_t)` was called.
Fixes https://github.com/facebook/folly/issues/576.

Reviewed By: Orvid

Differential Revision: D4861336

fbshipit-source-id: 1b6f67b291451048ba79d638d2c1184f9245dc0c
parent b8ec2ef5
......@@ -565,7 +565,8 @@ std::unique_ptr<IOBuf> LZ4FrameCodec::doUncompress(
growthSize = std::min(uncompressedLength, growthSize);
} else {
// Reduce growthSize for small data
const auto guessUncompressedLen = 4 * std::max(blockSize, in.size());
const auto guessUncompressedLen =
4 * std::max<uint64_t>(blockSize, in.size());
growthSize = std::min(guessUncompressedLen, growthSize);
}
// Once LZ4_decompress() is called, the dctx_ cannot be reused until it
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment