summaryrefslogtreecommitdiff
path: root/common/splash_source.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-02-15 19:19:56 -0500
committerTom Rini <trini@konsulko.com>2021-02-15 22:31:54 -0500
commitb6f4c757959f8850e1299a77c8e5713da78e8ec0 (patch)
tree2de8580b23f833e100a186448625721d71625521 /common/splash_source.c
parent6144438fb5c9059dc87cf219bed0c992f70b3509 (diff)
parent3f04db891a353f4b127ed57279279f851c6b4917 (diff)
Merge branch '2021-02-15-fix-CVE-2021-27097-CVE-2021-27138'
Fix CVE-2021-27097 and CVE-2021-27138. For more details see http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-27097 and http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-27138
Diffstat (limited to 'common/splash_source.c')
-rw-r--r--common/splash_source.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/splash_source.c b/common/splash_source.c
index 2737fc6e7ff..d7f179e3ea4 100644
--- a/common/splash_source.c
+++ b/common/splash_source.c
@@ -337,10 +337,10 @@ static int splash_load_fit(struct splash_location *location, u32 bmp_load_addr)
if (res < 0)
return res;
- res = fit_check_format(fit_header);
- if (!res) {
+ res = fit_check_format(fit_header, IMAGE_SIZE_INVAL);
+ if (res) {
debug("Could not find valid FIT image\n");
- return -EINVAL;
+ return res;
}
/* Get the splash image node */