Fix: Add additional checks for NULL input and zero length input in WC_NULL_CIPHER_TYPE case

Co-Authored-By: lealem@wolfssl.com <lealem@wolfssl.com>
devin/1740757542-null-cipher-evp-update
Devin AI 2025-02-28 18:10:19 +00:00
parent b8146c19e1
commit 1f082911ed
1 changed files with 3 additions and 1 deletions

View File

@ -1063,7 +1063,9 @@ int wolfSSL_EVP_CipherUpdate(WOLFSSL_EVP_CIPHER_CTX *ctx,
if (out == NULL) {
return WOLFSSL_FAILURE;
}
XMEMCPY(out, in, inl);
if (in != NULL && inl > 0) {
XMEMCPY(out, in, inl);
}
*outl = inl;
return WOLFSSL_SUCCESS;
#if !defined(NO_AES) && defined(HAVE_AESGCM)