From af3296a836a6e96316cb6d49f8d2889c723d3619 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Mon, 14 Jul 2025 17:28:23 -0400 Subject: [PATCH] wc_PKCS7_KeyWrap(): mark pointers as to const and check for NULL --- wolfcrypt/src/pkcs7.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wolfcrypt/src/pkcs7.c b/wolfcrypt/src/pkcs7.c index 6b134e25f..dfad85fb3 100644 --- a/wolfcrypt/src/pkcs7.c +++ b/wolfcrypt/src/pkcs7.c @@ -6816,13 +6816,13 @@ static int PKCS7_GenerateContentEncryptionKey(wc_PKCS7* pkcs7, word32 len) /* wrap CEK (content encryption key) with KEK, returns output size (> 0) on * success, < 0 on error */ -static int wc_PKCS7_KeyWrap(wc_PKCS7 * pkcs7, byte* cek, word32 cekSz, byte* kek, - word32 kekSz, byte* out, word32 outSz, - int keyWrapAlgo, int direction) +static int wc_PKCS7_KeyWrap(wc_PKCS7 const * pkcs7, byte const * cek, + word32 cekSz, byte const * kek, word32 kekSz, byte * out, word32 outSz, + int keyWrapAlgo, int direction) { int ret = 0; - if (cek == NULL || kek == NULL || out == NULL) + if (pkcs7 == NULL || cek == NULL || kek == NULL || out == NULL) return BAD_FUNC_ARG; switch (keyWrapAlgo) {