Description: actually use the aligned buffer when required Upstream implemented a fix for issue 108, but didn't actually use the aligned buffer in place of the unaligned data. This worked fine everywhere except our armhf buildds, since other archs don't actually raise SIGBUS on unaligned access. Author: Steve Langasek Bug-Upstream: https://github.com/haskell-crypto/cryptonite/issues/108 Bug-Debian: https://bugs.debian.org/841983 Forwarded-Upstream: yes --- a/cbits/cryptonite_sha3.c +++ b/cbits/cryptonite_sha3.c @@ -135,8 +135,8 @@ void cryptonite_sha3_update(struct sha3_ uint64_t tramp[SHA3_BUF_SIZE_MAX/8]; ASSERT_ALIGNMENT(tramp, 8); for (; len >= ctx->bufsz; len -= ctx->bufsz, data += ctx->bufsz) { - memcpy(tramp, data, ctx->bufsz / 8); - sha3_do_chunk(ctx->state, (uint64_t *) data, ctx->bufsz / 8); + memcpy(tramp, data, ctx->bufsz); + sha3_do_chunk(ctx->state, tramp, ctx->bufsz / 8); } } else { /* process as much ctx->bufsz-block */