X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libfdt%2Ffdt_rw.c;h=5c27a677e3536ed7320ee399113666975e5d545b;hb=bec9cab9291bb221714d559a44fe37669a8ca604;hp=cd06178e7b023c37ae23d165d1fb6456673a43d1;hpb=fc7758ee4f5782878f2e96876b7bc56cfee0ac66;p=u-boot diff --git a/libfdt/fdt_rw.c b/libfdt/fdt_rw.c index cd06178e7b..5c27a677e3 100644 --- a/libfdt/fdt_rw.c +++ b/libfdt/fdt_rw.c @@ -410,6 +410,8 @@ int fdt_open_into(const void *fdt, void *buf, int bufsize) struct_size = 0; while (fdt_next_tag(fdt, struct_size, &struct_size) != FDT_END) ; + if (struct_size < 0) + return struct_size; } if (!_fdt_blocks_misordered(fdt, mem_rsv_size, struct_size)) {