From: Marco Bettini Date: Fri, 30 May 2025 14:52:55 +0000 (+0000) Subject: lib-dcrypt: dcrypt_openssl_ctx_sym_init() SSL3 - Add missing return on dcrypt_openssl... X-Git-Tag: 2.4.2~706 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=698abad909944e07d37fd013533e344b80259a40;p=thirdparty%2Fdovecot%2Fcore.git lib-dcrypt: dcrypt_openssl_ctx_sym_init() SSL3 - Add missing return on dcrypt_openssl_error() Found by coverity, 40465 Dereference after null check --- 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);