lib: fdt: add integer overflow checks
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

CanarySolutions/little-kernel,Foxda-Tech/polaris-bootable-bootloader-lk,CanarySolutions/little-kernel,efidroid/lk,CanarySolutions/little-kernel,CanarySolutions/little-kernel,Foxda-Tech/polaris-bootable-bootloader-lk,efidroid/lk,Foxda-Tech/polaris-bootable-bootloader-lk,efidroid/lk,Foxda-Tech/polaris-bootable-bootloader-lk,CanarySolutions/little-kernel,efidroid/lk,efidroid/lk,Foxda-Tech/polaris-bootable-bootloader-lk