forked from len0rd/rockbox
rolo: fix crc calculation for mi4
crc32gentab() which initilizes crc table was called in bootloader but not in main binary. Fix this temporary by always calling it in load_mi4(). The proper fix probably to switch to const table and drop runtime initialization. Change-Id: I8b0c2c791642f56ed56189d156647661935a815d
This commit is contained in:
parent
c9816f57bf
commit
314516e228
1 changed files with 2 additions and 0 deletions
|
|
@ -207,6 +207,8 @@ int load_mi4(unsigned char* buf,
|
|||
return EREAD_IMAGE_FAILED;
|
||||
|
||||
/* Check CRC32 to see if we have a valid file */
|
||||
chksum_crc32gentab();
|
||||
|
||||
sum = chksum_crc32 (buf, mi4header.mi4size - MI4_HEADER_SIZE);
|
||||
|
||||
if(sum != mi4header.crc32)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue