Re: [PATCH v4 03/16] block: fix theoretical overflow in bdrv_init_padding()

2021-01-21 Thread Eric Blake
On 12/11/20 12:39 PM, Vladimir Sementsov-Ogievskiy wrote: > Calculation of sum may theoretically overflow, so use 64bit type and > add some good assertions. > > Use int64_t constantly. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/io.c | 8 ++-- > 1 file changed, 6 insertion

[PATCH v4 03/16] block: fix theoretical overflow in bdrv_init_padding()

2020-12-11 Thread Vladimir Sementsov-Ogievskiy
Calculation of sum may theoretically overflow, so use 64bit type and add some good assertions. Use int64_t constantly. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/io.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/block/io.c b/block/io.c index 21e8a50725.