Skip to content
Snippets Groups Projects
Commit 741a6d01 authored by Jon Loeliger's avatar Jon Loeliger Committed by Gerald Van Baren
Browse files

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 <stevep@freescale.com>.

Signed-off-by: default avatarJon Loeliger <jdl@freescale.com>
parent bbdbc7cb
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment