diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/image.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/common/image.c b/common/image.c index f084d2b..852a96f 100644 --- a/common/image.c +++ b/common/image.c @@ -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; error: |