mirror of
https://github.com/smaeul/u-boot.git
synced 2025-10-13 12:26:01 +01:00
Merge branch 'patch/fdt-bounds-check' into allwinner
This commit is contained in:
commit
fd7b044eb5
@ -43,7 +43,7 @@ fdt_addr_t devfdt_get_addr_index(const struct udevice *dev, int index)
|
||||
}
|
||||
|
||||
reg = fdt_getprop(gd->fdt_blob, offset, "reg", &len);
|
||||
if (!reg || (len <= (index * sizeof(fdt32_t) * (na + ns)))) {
|
||||
if (!reg || (len < ((index + 1) * sizeof(fdt32_t) * (na + ns)))) {
|
||||
debug("Req index out of range\n");
|
||||
return FDT_ADDR_T_NONE;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user