From 71b7f34978c7332562300487af497559b67f600a Mon Sep 17 00:00:00 2001 From: Pauli Date: Fri, 1 Apr 2022 12:20:26 +1100 Subject: Fix Coverity 1503325 use after free Another reference counting false positive, now negated. Reviewed-by: Tomas Mraz Reviewed-by: Shane Lontis (Merged from https://github.com/openssl/openssl/pull/18014) --- crypto/evp/evp_enc.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'crypto/evp/evp_enc.c') 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; -- cgit v1.2.3