summaryrefslogtreecommitdiffstats
path: root/utils/nwztools/upgtools/upg.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils/nwztools/upgtools/upg.c')
-rw-r--r--utils/nwztools/upgtools/upg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/nwztools/upgtools/upg.c b/utils/nwztools/upgtools/upg.c
index 88eca59335..3270ced39b 100644
--- a/utils/nwztools/upgtools/upg.c
+++ b/utils/nwztools/upgtools/upg.c
@@ -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");