mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-04 11:53:55 +00:00
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:
parent
811b8b47fb
commit
2d3b44e307
1 changed files with 3 additions and 0 deletions
|
@ -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. */
|
||||
|
|
Loading…
Add table
Reference in a new issue