diff options
author | Neil Horman <nhorman@openssl.org> | 2023-09-01 12:13:19 -0400 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2023-09-12 15:59:11 +0200 |
commit | c32c3f2653e6c6ac42e09a83a2f51f8667827a04 (patch) | |
tree | d07b67add2292945b88b13c0029470499f9905a0 /providers | |
parent | 2c021e7d11f03ede2330398c4fd8e8c7bd8768ee (diff) |
Fix aes_gcm_siv dupctx function
This cipher family has a dupctx function, but was failing because it was
attempting to memdup a field only if it was null
Fix the conditional check to get it working again
Fixes #21887
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21933)
Diffstat (limited to 'providers')
-rw-r--r-- | providers/implementations/ciphers/cipher_aes_gcm_siv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/providers/implementations/ciphers/cipher_aes_gcm_siv.c b/providers/implementations/ciphers/cipher_aes_gcm_siv.c index 64f7f95039..2d4fd88658 100644 --- a/providers/implementations/ciphers/cipher_aes_gcm_siv.c +++ b/providers/implementations/ciphers/cipher_aes_gcm_siv.c @@ -71,7 +71,7 @@ static void *ossl_aes_gcm_siv_dupctx(void *vctx) ret->aad = NULL; ret->ecb_ctx = NULL; - if (in->aad == NULL) { + if (in->aad != NULL) { if ((ret->aad = OPENSSL_memdup(in->aad, UP16(ret->aad_len))) == NULL) goto err; } |