crc_be: bugfix: use only the last two bytes to index crc_table
This commit is contained in:
parent
dfbf7f02d9
commit
b4acc03e65
1 changed files with 1 additions and 1 deletions
2
crc32.c
2
crc32.c
|
@ -42,7 +42,7 @@ void crc_fill_table(ulong *table, int big, ulong polynomial)
|
|||
|
||||
void crc_be_cycle(ulong *table, ulong *remainder, char c)
|
||||
{
|
||||
ulong byte = table[((*remainder) >> 24) ^ c];
|
||||
ulong byte = table[(((*remainder) >> 24) ^ c) & 0xff];
|
||||
*remainder = (((*remainder) << 8) ^ byte) & 0xFFFFFFFF;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue