Skip to content

Commit

Permalink
fdt: allow to parse dtb files that are appened with external data
Browse files Browse the repository at this point in the history
Signed-off-by: Bartłomiej Burdukiewicz <[email protected]>
  • Loading branch information
dev-0x7C6 committed Mar 6, 2024
1 parent 6a0fa21 commit 2219b33
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/fdt/fdt-parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ fdt_parser::fdt_parser(const char *data, u64 size, iface_fdt_generator &generato
, m_handle_special_properties(handle_special_properties) {
if (size >= sizeof(fdt::header)) {
auto header = read_data_32be<fdt::header>(data);
if (FDT_MAGIC_VALUE != header.magic || size != header.totalsize)
if (FDT_MAGIC_VALUE != header.magic)
return;

if (size < header.totalsize)
return;

if (FDT_SUPPORT_ABOVE > header.version)
Expand Down

0 comments on commit 2219b33

Please sign in to comment.