diff mbox series

[silo] tilo: fix rootfs size check

Message ID 20190604214748.25377-1-aaro.koskinen@iki.fi
State Accepted
Delegated to: David Miller
Headers show
Series [silo] tilo: fix rootfs size check | expand

Commit Message

Aaro Koskinen June 4, 2019, 9:47 p.m. UTC
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>
---
 tilo/maketilo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

David Miller June 13, 2019, 9:07 p.m. UTC | #1
From: Aaro Koskinen <aaro.koskinen@iki.fi>
Date: Wed,  5 Jun 2019 00:47:48 +0300

> 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>

Applied, thank you.
diff mbox series

Patch

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);
 	}