[PATCH] bootm: bootm_open_initrd_uimage(): propagate error if initrd verification fails
Marc Kleine-Budde
mkl at pengutronix.de
Tue Sep 19 04:49:07 PDT 2017
If the verification of an initrd inside of an uImage fails an error message is
printed but the error is not propagated. Although this is not security
relevant, as the verification is currently only a CRC32 check, the error should
be returned. This patch fixes the problem.
Signed-off-by: Marc Kleine-Budde <mkl at pengutronix.de>
---
common/bootm.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/common/bootm.c b/common/bootm.c
index 81625d9157cc..eebaa799f548 100644
--- a/common/bootm.c
+++ b/common/bootm.c
@@ -173,6 +173,7 @@ static int bootm_open_initrd_uimage(struct image_data *data)
if (ret) {
printf("Checking data crc failed with %s\n",
strerror(-ret));
+ return ret;
}
}
uimage_print_contents(data->initrd);
--
2.11.0
More information about the barebox
mailing list