fix(bl1): prevent null pointer dereference

Added an assertion to ensure ptr is not NULL before
dereferencing it. This prevents potential null pointer
dereference issues detected by Coverity.

Change-Id: I2e3325cd7cbdf141959bacd6135461be24ae6169
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
This commit is contained in:
Manish V Badarkhe 2025-04-01 17:27:52 +01:00
parent 811b8b47fb
commit 2d3b44e307

View file

@ -170,6 +170,9 @@ static int bl1_fwu_image_check_overlaps(unsigned int image_id)
uintptr_t checked_image_base, checked_image_end;
checked_desc = bl1_plat_get_image_desc(image_id);
assert(checked_desc != NULL);
checked_info = &checked_desc->image_info;
/* Image being checked mustn't be empty. */