* [U-Boot] [PATCH] cpu/ppc4xx/fdt.c: avoid strcpy() to constant string
@ 2009-10-20 21:12 y at denx.de
2009-10-23 13:51 ` Stefan Roese
0 siblings, 1 reply; 2+ messages in thread
From: y at denx.de @ 2009-10-20 21:12 UTC (permalink / raw)
To: u-boot
From: Wolfgang Denk <wd@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@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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH] cpu/ppc4xx/fdt.c: avoid strcpy() to constant string
2009-10-20 21:12 [U-Boot] [PATCH] cpu/ppc4xx/fdt.c: avoid strcpy() to constant string y at denx.de
@ 2009-10-23 13:51 ` Stefan Roese
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Roese @ 2009-10-23 13:51 UTC (permalink / raw)
To: u-boot
On Tuesday 20 October 2009 23:12:13 y at denx.de wrote:
> 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.
Applied to u-boot-ppc4xx/master. Thanks.
Cheers,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-10-23 13:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-20 21:12 [U-Boot] [PATCH] cpu/ppc4xx/fdt.c: avoid strcpy() to constant string y at denx.de
2009-10-23 13:51 ` Stefan Roese
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox