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)
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;
}