nwztool: fix computation
It turns out the calculation gives the right result for the wrong reason, this fixes it. Change-Id: I36053c8993b5ae1e85380da59546ffade265fb3f
This commit is contained in:
parent
8ce60c54f7
commit
e371dee4a3
1 changed files with 1 additions and 1 deletions
|
@ -165,7 +165,7 @@ struct upg_file_t *upg_read_memory(void *buf, size_t size, const char *key,
|
|||
|
||||
/* check MD5 */
|
||||
uint8_t actual_md5[NWZ_MD5_SIZE];
|
||||
MD5_CalculateDigest(actual_md5, (md5 + 1), size - sizeof(struct upg_header_t));
|
||||
MD5_CalculateDigest(actual_md5, (md5 + 1), size - NWZ_MD5_SIZE);
|
||||
if(memcmp(actual_md5, md5->md5, NWZ_MD5_SIZE) != 0)
|
||||
{
|
||||
cprintf(RED, "Mismatch\n");
|
||||
|
|
Loading…
Reference in a new issue