diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2015-12-17 17:19:11 +1100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-07-19 07:01:08 +0200 |
commit | 87acb61eeab78ff031b0ffc0c12cdfaba04fc869 (patch) | |
tree | ea1c07989e6bea27cd6b3efb6a729b2ab2e3c1b9 /cpukit/dtc/libfdt/fdt_ro.c | |
parent | libfdt: check for potential overrun in _fdt_splice() (diff) | |
download | rtems-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 '')
0 files changed, 0 insertions, 0 deletions