From 3e90722d270c47f031dfdade67d469081121e900 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 28 Feb 2025 16:28:54 +0000 Subject: [PATCH] Fix: Add null check for out parameter in NULL_CIPHER_TYPE case Co-Authored-By: lealem@wolfssl.com --- wolfcrypt/src/evp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wolfcrypt/src/evp.c b/wolfcrypt/src/evp.c index 10b4e2569..c8647fd5b 100644 --- a/wolfcrypt/src/evp.c +++ b/wolfcrypt/src/evp.c @@ -1060,6 +1060,9 @@ int wolfSSL_EVP_CipherUpdate(WOLFSSL_EVP_CIPHER_CTX *ctx, switch (ctx->cipherType) { case WC_NULL_CIPHER_TYPE: + if (out == NULL) { + return WOLFSSL_FAILURE; + } XMEMCPY(out, in, inl); *outl = inl; return WOLFSSL_SUCCESS;