Forked from
KED Software Projects / Miscellaneous / KED U-Boot Fork
Source project has a limited visibility.
-
David Gibson authored
Using pointer arithmetic to generate a pointer outside a known object is, technically, undefined behaviour in C. Unfortunately, we were using that in fdt_offset_ptr() to detect overflows. To fix this we need to do our bounds / overflow checking on the offsets before constructing pointers from them. Reported-by:
David Binderman <dcb314@hotmail.com> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au> Signed-off-by:
Simon Glass <sjg@chromium.org>
David Gibson authoredUsing pointer arithmetic to generate a pointer outside a known object is, technically, undefined behaviour in C. Unfortunately, we were using that in fdt_offset_ptr() to detect overflows. To fix this we need to do our bounds / overflow checking on the offsets before constructing pointers from them. Reported-by:
David Binderman <dcb314@hotmail.com> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au> Signed-off-by:
Simon Glass <sjg@chromium.org>