summaryrefslogtreecommitdiffstats
path: root/lib/libssl/src/crypto/engine/hw_cryptodev.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libssl/src/crypto/engine/hw_cryptodev.c')
-rw-r--r--lib/libssl/src/crypto/engine/hw_cryptodev.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libssl/src/crypto/engine/hw_cryptodev.c b/lib/libssl/src/crypto/engine/hw_cryptodev.c
index d3b186c1324..a98f5d7e578 100644
--- a/lib/libssl/src/crypto/engine/hw_cryptodev.c
+++ b/lib/libssl/src/crypto/engine/hw_cryptodev.c
@@ -693,8 +693,9 @@ xcrypt_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
viac3_xcrypt_cbc(cw, usein, useout, ctx->cipher_data, inl / 16, ivp);
- if (ISUNALIGNED(out)) {
- bcopy(spare, out, inl);
+ if (ISUNALIGNED(in) || ISUNALIGNED(out)) {
+ if (ISUNALIGNED(out))
+ bcopy(spare, out, inl);
free(spare);
}