Am 18.03.2025 um 11:19 hat ger...@altlinux.org geschrieben: > From: Denis Rastyogin <ger...@altlinux.org> > > This error was discovered by fuzzing qemu-img. > > This commit fixes a division by zero error in the bench_cb() function > that occurs when using the bench command with a zero-sized image. > > The issue arises because b->image_size can be zero, leading to a > division by zero in the modulo operation (b->offset %= b->image_size). > This patch adds a check for b->image_size == 0 and resets b->offset > to 0 in such cases, preventing the error. > > Signed-off-by: Denis Rastyogin <ger...@altlinux.org>
Thanks, applied to the block branch. Kevin