summaryrefslogtreecommitdiffstats
path: root/crypto/evp
diff options
context:
space:
mode:
authorPauli <pauli@openssl.org>2022-04-01 12:20:26 +1100
committerPauli <pauli@openssl.org>2022-05-06 18:21:22 +1000
commit71b7f34978c7332562300487af497559b67f600a (patch)
tree25a2b1dc4c28d59817100d4f6791dec60de9c346 /crypto/evp
parent66cb4fcdc5039fe5b1476ed48a936137a307a58b (diff)
Fix Coverity 1503325 use after free
Another reference counting false positive, now negated. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/18014)
Diffstat (limited to 'crypto/evp')
-rw-r--r--crypto/evp/evp_enc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/evp/evp_enc.c b/crypto/evp/evp_enc.c
index c31503e770..a8f43b9b76 100644
--- a/crypto/evp/evp_enc.c
+++ b/crypto/evp/evp_enc.c
@@ -202,6 +202,8 @@ static int evp_cipher_init_internal(EVP_CIPHER_CTX *ctx,
return 0;
}
EVP_CIPHER_free(ctx->fetched_cipher);
+ /* Coverity false positive, the reference counting is confusing it */
+ /* coverity[use_after_free] */
ctx->fetched_cipher = (EVP_CIPHER *)cipher;
}
ctx->cipher = cipher;