summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorJens Wiklander <jens.wiklander@linaro.org>2020-12-14 12:57:36 +0100
committerJérôme Forissier <jerome@forissier.org>2020-12-15 11:46:38 +0100
commit4cfcf34537c9420cc08302795ca217372dafdd71 (patch)
treea952a0ef7623004eb186c05787c2256bc8a9c561 /core
parent8bdc52f7e9f02caa5f3480e3487b0f8266ab6be2 (diff)
core: copy mode in cts_copy_state()
Fixes cts_copy_state() by copying the "mode" element also for the state to be complete. Fixes: 96098f011f7c ("core: crypto: introduce struct crypto_cipher_ops") Acked-by: Jerome Forissier <jerome@forissier.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reported-by: Tony He <tony.he@armchina.com> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Diffstat (limited to 'core')
-rw-r--r--core/crypto/aes-cts.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/crypto/aes-cts.c b/core/crypto/aes-cts.c
index 93bfdfa9..44142ab8 100644
--- a/core/crypto/aes-cts.c
+++ b/core/crypto/aes-cts.c
@@ -220,6 +220,7 @@ static void cts_copy_state(struct crypto_cipher_ctx *dst_ctx,
crypto_cipher_copy_state(dst->cbc, src->cbc);
crypto_cipher_copy_state(dst->ecb, src->ecb);
+ dst->mode = src->mode;
}
static const struct crypto_cipher_ops cts_ops = {