projects
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a7b3918
)
common/cmd_nvedit.c: Fix size calculation in do_env_import()
author
Horst Kronstorfer
<hkronsto@frequentis.com>
Fri, 16 Dec 2011 23:33:10 +0000
(23:33 +0000)
committer
Wolfgang Denk
<wd@denx.de>
Mon, 19 Dec 2011 09:19:34 +0000
(10:19 +0100)
do_env_import() missed the final '\0' terminator when calculating the
size of an environment data block. This led to an erroneous 'bad CRC,
import failed' message for a checksum protected environment (-c.)
Signed-off-by: Horst Kronstorfer <hkronsto@frequentis.com>
common/cmd_nvedit.c
patch
|
blob
|
history
diff --git
a/common/cmd_nvedit.c
b/common/cmd_nvedit.c
index baaa513f6b2856ddc5d41d8735b9afc429b4d79c..63afc82fe2078b56809cbdc8156044d95f7aefc9 100644
(file)
--- a/
common/cmd_nvedit.c
+++ b/
common/cmd_nvedit.c
@@
-868,7
+868,7
@@
static int do_env_import(cmd_tbl_t *cmdtp, int flag,
printf("## Warning: Input data exceeds %d bytes"
" - truncated\n", MAX_ENV_SIZE);
}
-
++size
;
+
size += 2
;
printf("## Info: input data size = %zu = 0x%zX\n", size, size);
}