mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-01-22 01:30:35 -05:00
nwztools: fix wrongly generate MD5 files
When generating the MD5 using -z index,name the tool would add the entry but forgot to increase the file size, hence truncating the file. Change-Id: Ibd3c594722ab46350cda60d158666fe34a96e922
This commit is contained in:
parent
6533d983ca
commit
4e89e0e0ea
1 changed files with 1 additions and 0 deletions
|
|
@ -470,6 +470,7 @@ static int create_upg(int argc, char **argv)
|
|||
upg->files[1].data = realloc(upg->files[1].data, upg->files[1].size + md5_prepend_sz);
|
||||
memmove(upg->files[1].data + md5_prepend_sz, upg->files[1].data, upg->files[1].size);
|
||||
memcpy(upg->files[1].data, md5_prepend, md5_prepend_sz);
|
||||
upg->files[1].size += md5_prepend_sz;
|
||||
|
||||
size_t size = 0;
|
||||
void *buf = upg_write_memory(upg, g_key, g_sig, &size, NULL, generic_std_printf);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue