devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] of/fdt: fix allocation size for device node path
@ 2015-04-14  4:36 Ricky Liang
       [not found] ` <1428986165-6250-1-git-send-email-jcliang-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Ricky Liang @ 2015-04-14  4:36 UTC (permalink / raw)
  To: Grant Likely
  Cc: Ricky Liang, Rob Herring, open list:OPEN FIRMWARE AND...,
	open list

The allocation size of device node path is off by one which drops the
'\0' terminator.

Signed-off-by: Ricky Liang <jcliang-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
---
 drivers/of/fdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index 3a896c9..98a9e6e 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -172,7 +172,7 @@ static void * unflatten_dt_node(void *blob,
 	if (!pathp)
 		return mem;
 
-	allocl = l++;
+	allocl = ++l;
 
 	/* version 0x10 has a more compact unit name here instead of the full
 	 * path. we accumulate the full path size using "fpsize", we'll rebuild
-- 
2.1.2

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2015-04-15 13:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-14  4:36 [PATCH] of/fdt: fix allocation size for device node path Ricky Liang
     [not found] ` <1428986165-6250-1-git-send-email-jcliang-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2015-04-15 12:15   ` Grant Likely
2015-04-15 12:37     ` Ricky Liang
     [not found]     ` <20150415121515.8E1FAC40A0B-WNowdnHR2B42iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
2015-04-15 13:00       ` Rob Herring

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).