libfdt: Correct the string size while renaming fragments in property
Copy the actual string size instead of the rest of property size
when converting property value from fragment@M to fragment@M+delta,
it maybe overwrite the next node value.
Change-Id: I9ce2f0ea7a4b83cac5f7a7c9bd0c63eb229bf761
Signed-off-by: Lijuan Gao <quic_lijuang@quicinc.com>
diff --git a/libfdt/fdt_overlay.c b/libfdt/fdt_overlay.c
index 531294c..52eabd1 100644
--- a/libfdt/fdt_overlay.c
+++ b/libfdt/fdt_overlay.c
@@ -1232,7 +1232,6 @@
ret = fdt_setprop_placeholder(fdto, offset, label, needed, &p);
if (ret < 0)
return ret;
- len = needed;
}
start = p;
@@ -1262,6 +1261,7 @@
if (available < needed) {
diff = needed - available;
memmove(stop + diff, stop, (end - stop));
+ end += diff;
}
{