From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 18 Oct 2007 14:17:25 +1000 From: David Gibson To: Jon Loeliger Subject: libfdt: Add missing RW_CHECK_HEADER to fdt_del_node() Message-ID: <20071018041725.GD8206@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linuxppc-dev@ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 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