If the file size does not fit in 32 bits the (unsigned) cast will
overflow. Cast to uint64_t which is the type of the value returned by
get_total_chunk_size.
http://tracker.ceph.com/issues/9537 Fixes: #9537
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
if (r >= 0) {
bufferlist::iterator bp = bl.begin();
::decode(hinfo, bp);
- assert(hinfo.get_total_chunk_size() == (unsigned)st.st_size);
+ assert(hinfo.get_total_chunk_size() == (uint64_t)st.st_size);
} else {
assert(0 == "missing hash attr");
}