]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - providers/implementations/ciphers/cipher_aes_gcm_siv.c
Fix aes_gcm_siv dupctx function
[thirdparty/openssl.git] / providers / implementations / ciphers / cipher_aes_gcm_siv.c
index 64f7f95039b66e488982a3191c7ebecbf8e5d1a9..2d4fd886583e50bea3baf26e1093be8e5026a4b6 100644 (file)
@@ -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;
     }