This patch applies the same changes in the original commit
below to the dtc to keep both sources in sync.
original commit:
lib: fdt: add integer overflow checks
added integer overflow checks to avoid buffer over reads/write
while using the fdt header fields.
CRs-fixed: 705078.
Change-Id: I062ee9e0610eeeeea32dd95695b18aa9dbca06ea
Bug: 19136881
Signed-off-by: Patrick Tjin <pattjin@google.com>