From d9c55f855b65872e9cc74799499416414441c217 Mon Sep 17 00:00:00 2001 From: Stefan Mavrodiev Date: Mon, 11 Nov 2019 10:04:43 +0200 Subject: Remove trailing zero from the overlay path 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 Message-Id: <20191111080444.9819-2-stefan@olimex.com> Signed-off-by: David Gibson --- 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)) { /* //__overlay__/ */ 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)) { /* //__overlay__ */ -- cgit v1.1