]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
objectstore/store_test.cc: fix unintentional integer overflow
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 4 Sep 2014 12:58:50 +0000 (14:58 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 4 Sep 2014 12:58:50 +0000 (14:58 +0200)
commit7b77210740e9cd201312a7eac475048858251dca
treeda761d63bb445f28c6bbfbae530b99d51017667a
parent6b70483232de10d67f6b4533be691dfcd4d31565
objectstore/store_test.cc: fix unintentional integer overflow

CID 1232603 (#1 of 1): Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)
 overflow_before_widen: Potentially overflowing expression
 objs_per_folder * folders_range(rng) with type int (32 bits,
 signed) is evaluated using 32-bit arithmetic before being
 used in a context which expects an expression of type
 uint64_t (64 bits, unsigned). To avoid overflow, cast
 either operand to uint64_t before performing the multiplication.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/test/objectstore/store_test.cc