summaryrefslogtreecommitdiffstats
path: root/common/bootm.c
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2017-09-19 13:49:07 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2017-09-20 08:20:41 +0200
commit0ed5c2ad9ea24d01cc3ee6523a73f4bcc959b13c (patch)
tree118c3fd1fccc6f4f314f544bc1f5e57a93dc1d15 /common/bootm.c
parent682569d2be1de9e11363fc54953db5a1f2bb96aa (diff)
downloadbarebox-0ed5c2ad9ea24d01cc3ee6523a73f4bcc959b13c.tar.gz
bootm: bootm_open_initrd_uimage(): propagate error if initrd verification fails
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@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/bootm.c')
-rw-r--r--common/bootm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/common/bootm.c b/common/bootm.c
index 81625d9..eebaa79 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);