mirror of
https://github.com/Dasharo/slimbootloader.git
synced 2026-06-14 04:16:15 -07:00
fix: [common] Fix Coverity issue
Check fdt_getprop_by_offset() return value for NULL pointer (like all other callers) to prevent a Coverity issue (CWE-476). Signed-off-by: Bruno Achauer <bruno.achauer@intel.com>
This commit is contained in:
@@ -557,6 +557,8 @@ static int overlay_apply_node(void *fdt, int target,
|
||||
return -FDT_ERR_INTERNAL;
|
||||
if (prop_len < 0)
|
||||
return prop_len;
|
||||
if (!prop)
|
||||
return -FDT_ERR_INTERNAL;
|
||||
|
||||
ret = fdt_setprop(fdt, target, name, prop, prop_len);
|
||||
if (ret)
|
||||
|
||||
Reference in New Issue
Block a user