projects
/
platform
/
kernel
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fw_printenv: Fix crash due to incorrect size for malloc'ed string.
[platform/kernel/u-boot.git]
/
tools
/
env
/
fw_env_main.c
diff --git
a/tools/env/fw_env_main.c
b/tools/env/fw_env_main.c
index
d93a915
..
fb4afa5
100644
(file)
--- a/
tools/env/fw_env_main.c
+++ b/
tools/env/fw_env_main.c
@@
-239,7
+239,7
@@
int main(int argc, char *argv[])
argv += optind;
if (env_opts.lockname) {
- lockname = malloc(s
izeof
(env_opts.lockname) +
+ lockname = malloc(s
trlen
(env_opts.lockname) +
sizeof(CMD_PRINTENV) + 10);
if (!lockname) {
fprintf(stderr, "Unable allocate memory");