Re: [PATCH v3] qcow2-bitmap: Fix uint64_t left-shift overflow

2019-10-31 Thread Vladimir Sementsov-Ogievskiy
30.10.2019 14:46, Tuguoyi wrote: > There are two issues in In check_constraints_on_bitmap(), > 1) The sanity check on the granularity will cause uint64_t > integer left-shift overflow when cluster_size is 2M and the > granularity is BIGGER than 32K. > 2) The way to calculate image size that the max

[PATCH v3] qcow2-bitmap: Fix uint64_t left-shift overflow

2019-10-30 Thread Tuguoyi
There are two issues in In check_constraints_on_bitmap(), 1) The sanity check on the granularity will cause uint64_t integer left-shift overflow when cluster_size is 2M and the granularity is BIGGER than 32K. 2) The way to calculate image size that the maximum bitmap supported can map to is a bit i