[PATCH] Fix an overflow case in fdt_offset_ptr() detected by GCC 4.3.

Jon Loeliger jdl at jdl.com
Tue Sep 30 07:13:27 EST 2008


> 
> 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 at freescale.com>.
> 
> Signed-off-by: Jon Loeliger <jdl at freescale.com>

Applied.

jdl



More information about the devicetree-discuss mailing list