summaryrefslogtreecommitdiffstats
path: root/cpukit/dtc/libfdt/fdt_ro.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2015-12-17 17:19:11 +1100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-07-19 07:01:08 +0200
commit87acb61eeab78ff031b0ffc0c12cdfaba04fc869 (patch)
treeea1c07989e6bea27cd6b3efb6a729b2ab2e3c1b9 /cpukit/dtc/libfdt/fdt_ro.c
parentlibfdt: check for potential overrun in _fdt_splice() (diff)
downloadrtems-87acb61eeab78ff031b0ffc0c12cdfaba04fc869.tar.bz2
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>
Diffstat (limited to 'cpukit/dtc/libfdt/fdt_ro.c')
0 files changed, 0 insertions, 0 deletions