libhdfs3 icon indicating copy to clipboard operation
libhdfs3 copied to clipboard

StripedBlockUtil.cpp: Potential integer overflow

Open stasos24 opened this issue 9 months ago • 0 comments

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

stasos24 avatar Mar 09 '25 15:03 stasos24