commit | 89599d40b54992bf738c8b2d58ad058114827f4a | [log] [tgz] |
---|---|---|
author | Rob Herring <rob.herring@calxeda.com> | Thu Sep 20 20:45:48 2012 -0500 |
committer | John Rigby <john.rigby@linaro.org> | Thu Dec 06 13:51:52 2012 -0700 |
tree | 61c9d294feaaaf10aa1539562bc52a0cde46d7ab | |
parent | dfba6105773e337b6cb73678efdecd1874e4fc7b [diff] |
cmd_pxe: fix bootargs malloc size Need a extra byte for the null termination. Signed-off-by: Rob Herring <rob.herring@calxeda.com>
diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c index a1aa69a..9f1c14d 100644 --- a/common/cmd_pxe.c +++ b/common/cmd_pxe.c
@@ -666,7 +666,7 @@ len += strlen(label->append); if (len) { - bootargs = malloc(len); + bootargs = malloc(len + 1); if (!bootargs) return 1; bootargs[0] ='\0';