From 28a88d1c7ce81734e8ddaa540efcc5da5a129a29 Mon Sep 17 00:00:00 2001 From: Anthony Hu Date: Wed, 27 Mar 2024 17:05:25 -0400 Subject: [PATCH] sizeof(oriType) ---> sizeof(asnDataOid) --- wolfcrypt/test/test.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index feab257fb..0aad3c8cd 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -41672,7 +41672,9 @@ static int myOriEncryptCb(PKCS7* pkcs7, byte* cek, word32 cekSz, byte* oriType, int i; /* make sure buffers are large enough */ - if ((*oriValueSz < (2 + cekSz)) || (*oriTypeSz < sizeof(oriType))) + if (*oriValueSz < (2 + cekSz)) + return WC_TEST_RET_ENC_NC; + if (*oriTypeSz < sizeof(asnDataOid)) return WC_TEST_RET_ENC_NC; /* our simple encryption algorithm will be take the bitwise complement */