cpu/ppc4xx/fdt.c: avoid strcpy() to constant string
authorWolfgang Denk <wd@denx.de>
Tue, 20 Oct 2009 21:07:04 +0000 (23:07 +0200)
committerWolfgang Denk <wd@denx.de>
Tue, 20 Oct 2009 21:07:04 +0000 (23:07 +0200)
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

index 496e0285b5bd802a9445f6df7f0883623d3590a9..b3108327f45a556648900bb27fdd65f58280fe2a 100644 (file)
@@ -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);