scripts/dtc/libfdt: add integer overflow checks
vijay kumar authored

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: default avatarPatrick Tjin <pattjin@google.com>
c4a17c8d