projects
/
platform
/
kernel
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
rockchip: rk3399: Add Nanopi M4 2GB board support
[platform/kernel/u-boot.git]
/
lib
/
libfdt
/
fdt_region.c
diff --git
a/lib/libfdt/fdt_region.c
b/lib/libfdt/fdt_region.c
index
d3b9a60
..
7e9fa92
100644
(file)
--- a/
lib/libfdt/fdt_region.c
+++ b/
lib/libfdt/fdt_region.c
@@
-96,6
+96,9
@@
int fdt_find_regions(const void *fdt, char * const inc[], int inc_count,
break;
case FDT_END_NODE:
+ /* Depth must never go below -1 */
+ if (depth < 0)
+ return -FDT_ERR_BADSTRUCTURE;
include = want;
want = stack[depth--];
while (end > path && *--end != '/')