summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/fdt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/fdt.c b/cmd/fdt.c
index 279dad9fe1..bc19303159 100644
--- a/cmd/fdt.c
+++ b/cmd/fdt.c
@@ -466,9 +466,9 @@ static int do_fdt(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
return ret;
} else if (subcmd[0] == 'a') {
/* Get address */
- char buf[11];
+ char buf[19];
- sprintf(buf, "0x%p", nodep);
+ snprintf(buf, sizeof(buf), "0x%p", nodep);
env_set(var, buf);
} else if (subcmd[0] == 's') {
/* Get size */