]> Git Repo - J-u-boot.git/commit - include/libfdt.h
Fix an overflow case in fdt_offset_ptr() detected by GCC 4.3.
authorJon Loeliger <[email protected]>
Thu, 25 Sep 2008 16:02:17 +0000 (11:02 -0500)
committerGerald Van Baren <[email protected]>
Thu, 2 Oct 2008 02:01:52 +0000 (22:01 -0400)
commit741a6d010d09b5bafca8e4cdfb6b2f8a2c07994d
treee980613007375a209df7a888a0acbc0a6459fea1
parentbbdbc7cb3abefda5bd998edbcf0508fe6256327d
Fix an overflow case in fdt_offset_ptr() detected by GCC 4.3.

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 <[email protected]>.

Signed-off-by: Jon Loeliger <[email protected]>
include/libfdt.h
libfdt/fdt.c
This page took 0.0347 seconds and 4 git commands to generate.