diff options
author | 2018-08-25 10:41:38 +0000 | |
---|---|---|
committer | 2018-08-25 10:41:38 +0000 | |
commit | 5f0b6d749b60d8fc3b9a4c497652ec8f531884cc (patch) | |
tree | 8a286d8a0bde83a2b699fa656d9430755d6112c6 | |
parent | Also run DSA tests with the PEM encoded public key. (diff) | |
download | wireguard-openbsd-5f0b6d749b60d8fc3b9a4c497652ec8f531884cc.tar.xz wireguard-openbsd-5f0b6d749b60d8fc3b9a4c497652ec8f531884cc.zip |
Insert new child nodes at the end.
ok patrick@
-rw-r--r-- | sys/arch/arm64/stand/efiboot/fdt.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/arch/arm64/stand/efiboot/fdt.c b/sys/arch/arm64/stand/efiboot/fdt.c index 4927247cbc1..7f9f0a2f2bd 100644 --- a/sys/arch/arm64/stand/efiboot/fdt.c +++ b/sys/arch/arm64/stand/efiboot/fdt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fdt.c,v 1.3 2017/08/23 18:03:54 kettenis Exp $ */ +/* $OpenBSD: fdt.c,v 1.4 2018/08/25 10:41:38 kettenis Exp $ */ /* * Copyright (c) 2009 Dariusz Swiderski <sfires@sfires.net> @@ -309,6 +309,10 @@ fdt_node_add_node(void *node, char *name, void **child) ptr = skip_node_name(ptr + 1); ptr = skip_props(ptr); + /* skip children */ + while (betoh32(*ptr) == FDT_NODE_BEGIN) + ptr = skip_node(ptr); + memmove((char *)ptr + len, ptr, tree.end - (char *)ptr); tree.struct_size += len; if (tree.strings > tree.tree) |