Skip to content
  • Jon Loeliger's avatar
    Fix an overflow case in fdt_offset_ptr() detected by GCC 4.3. · 741a6d01
    Jon Loeliger authored
    
    
    Using Gcc 4.3 detected this problem:
    
        ../dtc/libfdt/fdt.c: In function 'fdt_next_tag':
        ../dtc/libfdt/fdt.c:82: error: assuming signed overflow does not
        occur when assuming that (X + c) < X is always false
    
    To fix the problem, treat the offset as an unsigned int.
    
    The problem report and proposed fix were provided
    by Steve Papacharalambous <stevep@freescale.com>.
    
    Signed-off-by: default avatarJon Loeliger <jdl@freescale.com>
    741a6d01