fdtoverlay: Sanity check blob size

The fdtoverlay utility reads in the base fdt blob, then expands it to make
room for all the overlays requested.  However, it uses the totalsize field
of the base blob without verifying that it actually read all of it in (it's
possible the blob file could have been truncated).

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
1 file changed