catid / gf256

GF256 - Fast 8-bit Galois Field Math in C
BSD 3-Clause "New" or "Revised" License
51 stars 11 forks source link

Fix gf256_memswap in the GF256_TARGET_MOBILE case #8

Closed uweigand closed 3 years ago

uweigand commented 3 years ago

The initial loop did not update the "bytes" variable to reflect bytes already copied. Therefore in the case where "bytes & 8" is non-zero, the tail code would copy an extra 8 bytes beyond the end.

catid commented 3 years ago

Nice catch!