summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2016-10-02 23:59:26 (GMT)
committerSimon Glass <sjg@chromium.org>2016-10-13 19:54:10 (GMT)
commit491c7b6f42a8101f1e84cf8e13a0e23b5eca729e (patch)
treee823ddccede6edbf22cdffdebac66c63b2b05fec /test
parentef47683646516002694729986d19713e49b903e3 (diff)
downloadu-boot-491c7b6f42a8101f1e84cf8e13a0e23b5eca729e.tar.xz
libfdt: Fix undefined behaviour in fdt_offset_ptr()
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>
Diffstat (limited to 'test')
0 files changed, 0 insertions, 0 deletions