ctl_convert still had old logic assuming disk sizes were in MiB and
not bytes, causing an attempt to create a new disk using the '-i'
argument to generate impossibly large output disk images (e.g. 1 MiB
ends up 1 TiB).
Reported by and diff from Jesper Wallin.
-/* $OpenBSD: main.c,v 1.75 2023/04/28 19:46:41 dv Exp $ */
+/* $OpenBSD: main.c,v 1.76 2024/04/10 13:03:41 dv Exp $ */
/*
* Copyright (c) 2015 Reyk Floeter <reyk@openbsd.org>
if (dstsize == 0)
dstsize = src.size;
- else
- dstsize *= 1048576;
if (dstsize < (size_t)src.size) {
errstr = "size cannot be smaller than input disk size";
goto done;