Skip to contentSkip to conversation

Fixed an OF-tree off-by-one bug when adding a new property name.

PATCH New jdl at freescale.com 1 participant 1 message Aug 29, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fixed an OF-tree off-by-one bug when adding a new property name.

This bug will cause the kernel booting to pause a long time.

---

Note:
This patch is on top of the patches supplied by Matthew McClintock. Specifically, [PATCH 2/11] of June 27, 2006 with Subject:
Patch to modify ft_build.c to update flat device trees in place

CHANGELOG:

* Fix an off-by-one bug in OF-tree property handling. Patch by Zhang Wei, 28 Aug 2006

 common/ft_build.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
common/ft_build.c +1 -1
index b5a997c..b5937e3 100644
@@ -103,7 +103,7 @@ void ft_prop(struct ft_cxt *cxt, const c
 	if (off == -1) {
 		memcpy(cxt->p_end, name, strlen(name) + 1);
 		off = cxt->p_end - cxt->p;
-		cxt->p_end += strlen(name) + 2;
+		cxt->p_end += strlen(name) + 1;
 	}
 
 	/* now put offset from beginning of *STRUCTURE* */
Signature · 1 line
1.4.2.rc2.g85d6c-dirty