summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaro Koskinen <aaro.koskinen@iki.fi>2019-06-05 00:47:48 +0300
committerDavid S. Miller <davem@davemloft.net>2019-06-13 14:06:46 -0700
commitfcf8ffb4fba3ea72353c111ab7dc210eaae89223 (patch)
tree9395603afc7bb34e2beecd513530a79f4dbbe51b
parent2506051d55dd5cb9fe10b4e978e22fa00363044b (diff)
downloadsilo-fcf8ffb4fba3ea72353c111ab7dc210eaae89223.tar.gz
tilo: fix rootfs size check
When checking the rootfs size we use the kernel image size instead of the rootfs image. Fix that. Fixes: 9f151df0eecf ("tilo: sanity check image sizes") Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--tilo/maketilo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tilo/maketilo.c b/tilo/maketilo.c
index e698c92..2292bfd 100644
--- a/tilo/maketilo.c
+++ b/tilo/maketilo.c
@@ -244,8 +244,8 @@ int main (int argc, char **argv)
root_image_start = sun4u_kernel_start + len;
if (root_image) {
- check_size (root_image, root_image_start - output_buffer, len,
- MAX_BOOT_LEN);
+ check_size (root_image, root_image_start - output_buffer,
+ rootlen, MAX_BOOT_LEN);
fread (root_image_start, 1, rootlen, g);
fclose (g);
}