mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-21 06:31:31 +00:00
common/cmd_nvedit.c: Fix size calculation in do_env_import()
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>
This commit is contained in:
parent
a7b3918533
commit
d3f80c77ca
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue