提交 d3f80c77 编写于 作者: H Horst Kronstorfer 提交者: Wolfgang Denk

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: NHorst Kronstorfer <hkronsto@frequentis.com>
上级 a7b39185
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册