mirror of
https://github.com/ceph/ceph
synced 2025-01-18 09:02:08 +00:00
erasure-code: fix assert overflow
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>
This commit is contained in:
parent
0519225beb
commit
f51e368f98
@ -1456,7 +1456,7 @@ ECUtil::HashInfoRef ECBackend::get_hash_info(
|
||||
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");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user