[U-Boot] [PATCH] cpu/ppc4xx/fdt.c: avoid strcpy() to constant string

y at denx.de y at denx.de
Tue Oct 20 23:12:13 CEST 2009


From: Wolfgang Denk <wd at denx.de>

strcpy() was iused with the target address being a pointer to a
constant string, which potentially is read-only. Use a (writable)
array of characters instead.

Signed-off-by: Wolfgang Denk <wd at denx.de>
---
 cpu/ppc4xx/fdt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/cpu/ppc4xx/fdt.c b/cpu/ppc4xx/fdt.c
index 496e028..b310832 100644
--- a/cpu/ppc4xx/fdt.c
+++ b/cpu/ppc4xx/fdt.c
@@ -42,7 +42,7 @@ void __ft_board_setup(void *blob, bd_t *bd)
 	u32 bxcr;
 	u32 ranges[EBC_NUM_BANKS * 4];
 	u32 *p = ranges;
-	char *ebc_path = "/plb/opb/ebc";
+	char ebc_path[] = "/plb/opb/ebc";
 
 	ft_cpu_setup(blob, bd);
 
-- 
1.6.2.5



More information about the U-Boot mailing list