osd: fix UBSan shift overflow in pg_pool_t::calc_pg_masks
UBSan reports: shift exponent 32 is too large for 32-bit type 'int' When pg_num or pgp_num is 0, pg_num-1 wraps to UINT_MAX (unsigned), cbits() returns 32, and (1 << 32) on 32-bit int is undefined behavior. Use 1ULL for the shift so the expression is well-defined; for cbits() returning 32, (1ULL << 32) - 1 equals UINT_MAX. Signed-off-by: Alexander Indenbaum <aindenba@redhat.com>
A
Alexander Indenbaum committed
a964f35459c9e4e72a0920c647d2566487f713fe
Parent: 83f218a