mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-30 11:01:33 +00:00
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. Signed-off-by: Zhang Wei <wei.zhang@freescale.com>
This commit is contained in:
parent
34c3c0e01d
commit
2f15776ccc
1 changed files with 1 additions and 1 deletions
|
@ -103,7 +103,7 @@ void ft_prop(struct ft_cxt *cxt, const char *name, const void *data, int sz)
|
||||||
if (off == -1) {
|
if (off == -1) {
|
||||||
memcpy(cxt->p_end, name, strlen(name) + 1);
|
memcpy(cxt->p_end, name, strlen(name) + 1);
|
||||||
off = cxt->p_end - cxt->p;
|
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* */
|
/* now put offset from beginning of *STRUCTURE* */
|
||||||
|
|
Loading…
Add table
Reference in a new issue