aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Herring <rob.herring@calxeda.com>2012-09-20 20:45:48 -0500
committerJohn Rigby <john.rigby@linaro.org>2012-12-06 13:51:52 -0700
commit89599d40b54992bf738c8b2d58ad058114827f4a (patch)
tree61c9d294feaaaf10aa1539562bc52a0cde46d7ab
parentdfba6105773e337b6cb73678efdecd1874e4fc7b (diff)
downloadu-boot-linaro-next-89599d40b54992bf738c8b2d58ad058114827f4a.tar.gz
cmd_pxe: fix bootargs malloc size
Need a extra byte for the null termination. Signed-off-by: Rob Herring <rob.herring@calxeda.com>
-rw-r--r--common/cmd_pxe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c
index a1aa69aed..9f1c14d2d 100644
--- a/common/cmd_pxe.c
+++ b/common/cmd_pxe.c
@@ -666,7 +666,7 @@ static int label_boot(struct pxe_label *label)
len += strlen(label->append);
if (len) {
- bootargs = malloc(len);
+ bootargs = malloc(len + 1);
if (!bootargs)
return 1;
bootargs[0] ='\0';