The overlay path ends with trailing zero. When adding this path as property value, this character should be removed. This is the case when the overlay adds a node with an alias. Signed-off-by: Stefan Mavrodiev <stefan@xxxxxxxxxx> --- libfdt/fdt_overlay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libfdt/fdt_overlay.c b/libfdt/fdt_overlay.c index be71873..b310e49 100644 --- a/libfdt/fdt_overlay.c +++ b/libfdt/fdt_overlay.c @@ -752,7 +752,7 @@ static int overlay_symbol_update(void *fdt, void *fdto) if ((e - s) > len && (memcmp(s, "/__overlay__/", len) == 0)) { /* /<fragment-name>/__overlay__/<relative-subnode-path> */ rel_path = s + len; - rel_path_len = e - rel_path; + rel_path_len = e - rel_path - 1; } else if ((e - s) == len && (memcmp(s, "/__overlay__", len - 1) == 0)) { /* /<fragment-name>/__overlay__ */ -- 2.17.1