]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-dcrypt: dcrypt_openssl_ctx_sym_init() SSL3 - Add missing return on dcrypt_openssl...
authorMarco Bettini <marco.bettini@open-xchange.com>
Fri, 30 May 2025 14:52:55 +0000 (14:52 +0000)
committerMarco Bettini <marco.bettini@open-xchange.com>
Fri, 27 Jun 2025 13:54:52 +0000 (13:54 +0000)
Found by coverity, 40465 Dereference after null check

src/lib-dcrypt/dcrypt-openssl3.c

index ac8401838c2c1878c6bcfb256a08269196d37f71..c305eb46f4b3bc959da051c1b9ec940c02998499 100644 (file)
@@ -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);