From ea86b9e64b811753d9eabe0f560ee189fbe5d0c1 Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Fri, 29 Aug 2008 19:08:29 -0500 Subject: Prevent crash if random/invalid ramdisks are passed to bootm Adds returning an error from the ramdisk detection code if its not a real ramdisk (invalid). There is no reason we can't just return back to the console if we detect an invalid ramdisk or CRC error. Signed-off-by: Kumar Gala --- common/cmd_bootm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/cmd_bootm.c') diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index 374085ca3..751f5b99d 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -246,7 +246,7 @@ static int bootm_start(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) ret = boot_get_ramdisk (argc, argv, &images, IH_INITRD_ARCH, &images.rd_start, &images.rd_end); if (ret) { - puts ("Ramdisk image is corrupt\n"); + puts ("Ramdisk image is corrupt or invalid\n"); return 1; } -- cgit v1.2.3