mirror of
https://github.com/dgibson/dtc.git
synced 2025-12-08 12:45:29 -05:00
libfdt: Fix NOP handling bug in fdt_add_subnode_namelen()
fdt_add_subnode_namelen() has a bug if asked to add a subnode to a node which has NOP tags interspersed with its properties. In this case fdt_add_subnode_namelen() will put the new subnode before the first NOP tag, even if there are properties after it, which will result in an invalid blob. This patch fixes the bug, and adds a testcase for it. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
fc9769ac2b
commit
089adb9964
4 changed files with 91 additions and 2 deletions
|
|
@ -127,6 +127,9 @@ libfdt_tests () {
|
|||
|
||||
# Tests for behaviour on various sorts of corrupted trees
|
||||
run_test truncated_property
|
||||
|
||||
# Specific bug tests
|
||||
run_test add_subnode_with_nops
|
||||
}
|
||||
|
||||
dtc_tests () {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue