mirror of
https://github.com/dgibson/dtc.git
synced 2025-12-07 05:35:07 -05:00
libfdt: Add missing RW_CHECK_HEADER to fdt_del_node()
fdt_del_node(), unlike most of the rw functions does not check the fdt's header with RW_CHECK_HEADER. However, it could make a mess of things if the conditions in RW_CHECK_HEADER aren't met. So, this patch adds the omitted check. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
d7649da4b9
commit
394e47208d
1 changed files with 2 additions and 0 deletions
|
|
@ -329,6 +329,8 @@ int fdt_del_node(void *fdt, int nodeoffset)
|
|||
{
|
||||
int endoffset;
|
||||
|
||||
RW_CHECK_HEADER(fdt);
|
||||
|
||||
endoffset = _fdt_node_end_offset(fdt, nodeoffset);
|
||||
if (endoffset < 0)
|
||||
return endoffset;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue