]> git.baikalelectronics.ru Git - uboot.git/commit
lib: libfdt: fdt_region: avoid NULL pointer access
authorPhilippe Reynes <philippe.reynes@softathome.com>
Thu, 2 Jul 2020 17:31:29 +0000 (19:31 +0200)
committerSimon Glass <sjg@chromium.org>
Mon, 20 Jul 2020 17:37:47 +0000 (11:37 -0600)
commit9b438877b7d6046c2824312621d8aca821af02e7
treede991ce684d35059493ae9ca5f20a94c5f1695c4
parent276982d18b5a2e538fe982b9aa51b13b29e115c2
lib: libfdt: fdt_region: avoid NULL pointer access

The function fdt_find_regions look in the exclude list for each
property, even if the name is NULL. It could happen if the fit
image is corrupted. On sandbox, it generates a segfault.

To avoid this issue, if the name of a property is NULL, we report
an error and avoid looking in the exclude list.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
common/fdt_region.c