With large u and v, the product u * v exceeds the capacity of an int. The result when coerced to size_t can be an out of range index into bitmap. Avoid this by casting u and v to size_t before multiplying.
With large u and v, the product u * v exceeds the capacity of an int. The result when coerced to size_t can be an out of range index into bitmap. Avoid this by casting u and v to size_t before multiplying.