mirror of
https://github.com/dgibson/dtc.git
synced 2026-01-22 01:30:34 -05:00
It's unsafe to implicitly discard the const qualifier on a pointer. In overlay_fixup_phandle(), this was probably just an oversight, and making the "sep" variable a const char * is sufficient to fix it. In create_node(), however, the "p" variable is directly modifying the buffer pointed to by "const char* node_name". To fix this, we need to actually make a duplicate of the buffer and operate on that instead. This introduces a malloc()/free() and an unbounded strdup() into the operation, but fdtput isn't a long-running service and the node_name argument comes directly from argv, so this shouldn't introduce a significant performance impact. Signed-off-by: Stephen Gallagher <sgallagh@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> |
||
|---|---|---|
| .. | ||
| .gitignore | ||
| fdt.c | ||
| fdt.h | ||
| fdt_addresses.c | ||
| fdt_check.c | ||
| fdt_empty_tree.c | ||
| fdt_overlay.c | ||
| fdt_ro.c | ||
| fdt_rw.c | ||
| fdt_strerror.c | ||
| fdt_sw.c | ||
| fdt_wip.c | ||
| libfdt.h | ||
| libfdt_env.h | ||
| libfdt_internal.h | ||
| Makefile.libfdt | ||
| meson.build | ||
| sbom.cdx.json | ||
| TODO | ||
| version.lds | ||