mirror of
https://github.com/Stichting-MINIX-Research-Foundation/u-boot.git
synced 2025-09-10 12:39:22 -04:00
fdt: Check error codes returned from fdtlib when loading ITB
Before this patch, error codes returned from fdtlib were ignored and continued access would cause a crash. Now just check if the image is truncated and error if so. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
This commit is contained in:
parent
24fa0e588e
commit
367e125976
@ -2820,6 +2820,11 @@ int fit_image_check_hashes(const void *fit, int image_noffset)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (noffset == -FDT_ERR_TRUNCATED || noffset == -FDT_ERR_BADSTRUCTURE) {
|
||||||
|
err_msg = " error!\nCorrupted or truncated tree";
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user