mirror of
https://github.com/dgibson/dtc.git
synced 2026-04-12 00:47:46 -04:00
False effective head detection: fdt_totalsize(p) equal the len of dtb
file should be legitimate Signed-off-by: xionghui li <juicemail@163.com> fdt_totalsize(p) gets the total size of fdt, this value should be allowed to be equal to the size of the bin file.
This commit is contained in:
parent
0869f82691
commit
209efccc6a
1 changed files with 1 additions and 1 deletions
|
|
@ -169,7 +169,7 @@ static bool valid_header(char *p, size_t len)
|
||||||
fdt_magic(p) != FDT_MAGIC ||
|
fdt_magic(p) != FDT_MAGIC ||
|
||||||
fdt_version(p) > MAX_VERSION ||
|
fdt_version(p) > MAX_VERSION ||
|
||||||
fdt_last_comp_version(p) > MAX_VERSION ||
|
fdt_last_comp_version(p) > MAX_VERSION ||
|
||||||
fdt_totalsize(p) >= len ||
|
fdt_totalsize(p) > len ||
|
||||||
fdt_off_dt_struct(p) >= len ||
|
fdt_off_dt_struct(p) >= len ||
|
||||||
fdt_off_dt_strings(p) >= len)
|
fdt_off_dt_strings(p) >= len)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue