Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/openssl/openssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPauli <pauli@openssl.org>2022-04-01 04:20:26 +0300
committerPauli <pauli@openssl.org>2022-05-06 11:21:22 +0300
commit71b7f34978c7332562300487af497559b67f600a (patch)
tree25a2b1dc4c28d59817100d4f6791dec60de9c346 /crypto/evp/evp_enc.c
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/evp_enc.c')
-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;