linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* libfdt: Add missing RW_CHECK_HEADER to fdt_del_node()
@ 2007-10-18  4:17 David Gibson
  2007-10-22 16:38 ` Jon Loeliger
  0 siblings, 1 reply; 2+ messages in thread
From: David Gibson @ 2007-10-18  4:17 UTC (permalink / raw)
  To: Jon Loeliger; +Cc: linuxppc-dev

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>

Index: dtc/libfdt/fdt_rw.c
===================================================================
--- dtc.orig/libfdt/fdt_rw.c	2007-10-16 10:44:53.000000000 +1000
+++ dtc/libfdt/fdt_rw.c	2007-10-18 14:14:47.000000000 +1000
@@ -329,6 +329,8 @@
 {
 	int endoffset;
 
+	RW_CHECK_HEADER(fdt);
+
 	endoffset = _fdt_node_end_offset(fdt, nodeoffset);
 	if (endoffset < 0)
 		return endoffset;

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: libfdt: Add missing RW_CHECK_HEADER to fdt_del_node()
  2007-10-18  4:17 libfdt: Add missing RW_CHECK_HEADER to fdt_del_node() David Gibson
@ 2007-10-22 16:38 ` Jon Loeliger
  0 siblings, 0 replies; 2+ messages in thread
From: Jon Loeliger @ 2007-10-22 16:38 UTC (permalink / raw)
  To: David Gibson; +Cc: linuxppc-dev

So, like, the other day David Gibson mumbled:
> 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>

Applied.

jdl

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-10-22 16:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-18  4:17 libfdt: Add missing RW_CHECK_HEADER to fdt_del_node() David Gibson
2007-10-22 16:38 ` Jon Loeliger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).