diff --git a/libfdt/fdt_sw.c b/libfdt/fdt_sw.c index 178b365..024f4d8 100644 --- a/libfdt/fdt_sw.c +++ b/libfdt/fdt_sw.c @@ -170,7 +170,7 @@ int fdt_resize(void *fdt, void *buf, int bufsize) FDT_SW_PROBE(fdt); - headsize = fdt_off_dt_struct(fdt); + headsize = fdt_off_dt_struct(fdt) + fdt_size_dt_struct(fdt); tailsize = fdt_size_dt_strings(fdt); if ((headsize + tailsize) > bufsize)