lib/bloom: Fix bloom hashing on 32-bit architectures
authorPhilip Withnall <withnall@endlessm.com>
Sat, 30 Sep 2017 23:12:25 +0000 (00:12 +0100)
committerAtomic Bot <atomic-devel@projectatomic.io>
Sun, 1 Oct 2017 12:24:46 +0000 (12:24 +0000)
commit1673601510da20b132bcc3fd17d6e0cc9bf837dd
tree1eb543aaa930c8cb23cfda7a7cb259a72db2f7e1
parent4262a4b016ec1ca252dfb4b2fcc82a27f643ea63
lib/bloom: Fix bloom hashing on 32-bit architectures

There was an implicit cast from guint64 to gsize (which is 32-bit on
armhf, for example) before the modulus arithmetic which safely narrows
the index.

Fix that by using a guint64 intermediate variable and making the cast
explicit.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
Closes: #1231
Approved by: cgwalters
src/libostree/ostree-bloom.c