shiyanhui/dht

fastXORBytes will panic on some architectures due to unaligned access

yuzhouu opened this issue · 1 comments

As the byte slices might not be word aligned, so on some architectures, fastXORBytes will panic due to unaligned access. you need to do the word arithmetic only on the aligned parts of the slice, and bytewise arithmetic on the unaligned part.

fixed