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:
Marcin Bukat 2014-07-01 09:16:03 +02:00
parent c9816f57bf
commit 314516e228

View file

@ -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)