dtc/libfdt
David Gibson 69a1bd6ad3 libfdt: Remove undefined behaviour setting empty properties
The standard way of setting an empty property using libfdt is:
    fdt_setprop(fdt, nodeoffset, propname, NULL, 0);
However, the implementation of this includes an unconditional:
     memcpy(prop->data, NULL, 0);
Which although it will be a no-op (which is what we want) on many platforms
is technically undefined behaviour.  Correct this, so that when passing
a 0 length, passing a NULL pointer as the value to fdt_setprop() is
definitely safe.  This should quiet static checkers which complain about
this.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-02-24 10:51:05 +11:00
..
Makefile.libfdt libfdt: Add overlay application function 2016-10-06 19:22:41 +11:00
TODO dtc: Update TODO files 2007-12-19 08:20:26 -06:00
fdt.c libfdt: Fix undefined behaviour in fdt_offset_ptr() 2015-12-17 17:19:11 +11:00
fdt.h Added license header to dtc/libfdt/fdt.h and libfdt_env.h 2013-02-18 08:03:50 -06:00
fdt_addresses.c libfdt: Add helpers to read #address-cells and #size-cells 2014-05-12 16:01:09 +10:00
fdt_empty_tree.c libfdt: Add helper function to create a trivial, empty tree 2012-06-03 09:16:17 -05:00
fdt_overlay.c tests: Correct fdt handling of overlays without fixups and base trees without symbols 2016-12-09 16:13:29 +11:00
fdt_ro.c libfdt: fix fdt_stringlist_search() 2016-10-17 20:56:58 +11:00
fdt_rw.c libfdt: Remove undefined behaviour setting empty properties 2017-02-24 10:51:05 +11:00
fdt_strerror.c libfdt: add missing errors to fdt_strerror() 2016-11-04 07:17:20 +11:00
fdt_sw.c libfdt: Add function to resize the buffer for a sequential write tree 2013-10-26 00:17:37 +11:00
fdt_wip.c libfdt: Add fdt_setprop_inplace_namelen_partial 2016-08-01 13:34:39 +10:00
libfdt.h libfdt: Add overlay application function 2016-10-06 19:22:41 +11:00
libfdt_env.h libfdt: Add overlay application function 2016-10-06 19:22:41 +11:00
libfdt_internal.h libfdt: avoid shadowing "err" in FDT_CHECK_HEADER 2014-01-25 15:11:20 +11:00
version.lds libfdt: Add fdt_overlay_apply to the exported symbols 2016-10-11 20:08:38 +11:00