From 698abad909944e07d37fd013533e344b80259a40 Mon Sep 17 00:00:00 2001 From: Marco Bettini Date: Fri, 30 May 2025 14:52:55 +0000 Subject: [PATCH] lib-dcrypt: dcrypt_openssl_ctx_sym_init() SSL3 - Add missing return on dcrypt_openssl_error() Found by coverity, 40465 Dereference after null check --- src/lib-dcrypt/dcrypt-openssl3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib-dcrypt/dcrypt-openssl3.c b/src/lib-dcrypt/dcrypt-openssl3.c index ac8401838c..c305eb46f4 100644 --- a/src/lib-dcrypt/dcrypt-openssl3.c +++ b/src/lib-dcrypt/dcrypt-openssl3.c @@ -435,7 +435,7 @@ dcrypt_openssl_ctx_sym_init(struct dcrypt_context_symmetric *ctx, i_assert(ctx->ctx == NULL); if ((ctx->ctx = EVP_CIPHER_CTX_new()) == NULL) - dcrypt_openssl_error(error_r); + return dcrypt_openssl_error(error_r); ec = EVP_CipherInit_ex(ctx->ctx, ctx->cipher, NULL, ctx->key, ctx->iv, ctx->mode); -- 2.47.3