Message ID | 20250327162423.25154-5-gerben@altlinux.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | Fix qemu-img bench issues and improve checks | expand |
diff --git a/qemu-img.c b/qemu-img.c index 5cbf3d18d7..4817bd9b05 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -4581,7 +4581,7 @@ static int img_bench(int argc, char **argv) { unsigned long res; - if (qemu_strtoul(optarg, NULL, 0, &res) < 0 || res > INT_MAX) { + if (qemu_strtoul(optarg, NULL, 0, &res) <= 0 || res > INT_MAX) { error_report("Invalid queue depth specified"); return 1; }