From 1e27fb5d5b1258605315aeea2236649432b7a522 Mon Sep 17 00:00:00 2001 From: Norbert Pocs Date: Wed, 14 May 2025 15:59:24 +0200 Subject: [PATCH] cipher_chacha20_poly1305.c: Remove unneeded check MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This iterates through the given param list which means the param p should always be present in the given array. Resolves coverity scan issue 1646880. Signed-off-by: Norbert Pocs Reviewed-by: Saša Nedvědický Reviewed-by: Neil Horman Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/27623) --- providers/implementations/ciphers/cipher_chacha20_poly1305.c.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/implementations/ciphers/cipher_chacha20_poly1305.c.in b/providers/implementations/ciphers/cipher_chacha20_poly1305.c.in index 2b59dfd4231..8e32bf3fd9a 100644 --- a/providers/implementations/ciphers/cipher_chacha20_poly1305.c.in +++ b/providers/implementations/ciphers/cipher_chacha20_poly1305.c.in @@ -128,7 +128,7 @@ static int chacha20_poly1305_get_ctx_params(void *vctx, OSSL_PARAM params[]) break; case PIDX_CIPHER_PARAM_AEAD_TAGLEN: - if (p != NULL && !OSSL_PARAM_set_size_t(p, ctx->tag_len)) { + if (!OSSL_PARAM_set_size_t(p, ctx->tag_len)) { ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER); return 0; } -- 2.47.3