--- zzzz-none-000/linux-4.4.60/scripts/dtc/libfdt/fdt.c 2017-04-08 07:53:53.000000000 +0000 +++ scorpion-7490-727/linux-4.4.60/scripts/dtc/libfdt/fdt.c 2021-02-04 17:41:59.000000000 +0000 @@ -78,7 +78,15 @@ { const char *p; - if (fdt_version(fdt) >= 0x11) + if (fdt_version(fdt) >= 0x11 +#ifdef CONFIG_OF_AVM_DT + /* In case the dt was build in v17 but without offset + * information, we verify that the offset contains a non + * zero value. + */ + && fdt_size_dt_struct(fdt) +#endif + ) if (((offset + len) < offset) || ((offset + len) > fdt_size_dt_struct(fdt))) return NULL;