libhdfs3
libhdfs3 copied to clipboard
StripedBlockUtil.cpp: Potential integer overflow
Since int64_t StripedBlockUtil::getInternalBlockLengt returns int64_t https://github.com/ClickHouse/libhdfs3/blob/d0ae7d2568151feef61d3ec7896803262f0e0f91/src/client/StripedBlockUtil.cpp#L117-L134 and only dataSize has int64_t
there could be integer overflow at: https://github.com/ClickHouse/libhdfs3/blob/d0ae7d2568151feef61d3ec7896803262f0e0f91/src/client/StripedBlockUtil.cpp#L132-L134
Possible fix: cast one of member of adddition to int64_t