]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
libfdt: Fix NOP handling bug in fdt_add_subnode_namelen()
authorDavid Gibson <david@gibson.dropbear.id.au>
Thu, 14 Feb 2008 05:50:34 +0000 (16:50 +1100)
committerGerald Van Baren <vanbaren@cideas.com>
Wed, 19 Mar 2008 01:03:45 +0000 (21:03 -0400)
commitf84d65f9b085ffbed464d1d58e8aaa8f5a2efc07
tree404dfca7532971a2952d96cc60296f34cd026c30
parentae0b5908de3b9855f8931bc9b32c9fc4962df5a9
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>
libfdt/fdt_rw.c