From bfb2a817e3ce4ff87c130c74cb22d0eaf247bb1e Mon Sep 17 00:00:00 2001 From: Koji Takeda Date: Mon, 4 Aug 2025 17:10:11 +0900 Subject: [PATCH] Fix CID 535964 --- wolfcrypt/src/asn.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/wolfcrypt/src/asn.c b/wolfcrypt/src/asn.c index 9700eb510..cde672635 100644 --- a/wolfcrypt/src/asn.c +++ b/wolfcrypt/src/asn.c @@ -37058,6 +37058,8 @@ int DecodeAsymKey_Assign(const byte* input, word32* inOutIdx, word32 inSz, #endif if (input == NULL || inOutIdx == NULL || inSz == 0 || + (seed == NULL && seedLen != NULL) || + (seed != NULL && seedLen == NULL) || privKey == NULL || privKeyLen == NULL || pubKey == NULL || pubKeyLen == NULL || inOutKeyType == NULL) { @@ -37066,10 +37068,6 @@ int DecodeAsymKey_Assign(const byte* input, word32* inOutIdx, word32 inSz, #endif return BAD_FUNC_ARG; } - if ((seed == NULL && seedLen != NULL) || - (seed != NULL && seedLen == NULL)) { - return BAD_FUNC_ARG; - } allowSeed = (seed != NULL && seedLen != NULL);