Merge pull request #9887 from rlm2002/static_analysis

20260305 Coverity fixes
This commit is contained in:
Daniel Pouzzner
2026-03-10 22:34:57 -05:00
committed by GitHub
2 changed files with 1 additions and 3 deletions
-2
View File
@@ -5693,7 +5693,6 @@ static int wc_PKCS7_HandleOctetStrings(wc_PKCS7* pkcs7, byte* in, word32 inSz,
WOLFSSL_MSG("failed to grow content buffer.");
if (tempBuf != NULL) {
XFREE(tempBuf, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
tempBuf = NULL;
}
ret = MEMORY_E;
break;
@@ -5707,7 +5706,6 @@ static int wc_PKCS7_HandleOctetStrings(wc_PKCS7* pkcs7, byte* in, word32 inSz,
pkcs7->stream->expected);
if (tempBuf != NULL) {
XFREE(tempBuf, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
tempBuf = NULL;
}
}
}
+1 -1
View File
@@ -317,7 +317,7 @@ int wc_RipeMdFinal(RipeMd* ripemd, byte* hash)
AddLength(ripemd, ripemd->buffLen); /* before adding pads */
/* ensure we have a valid buffer length; */
if (ripemd->buffLen > RIPEMD_BLOCK_SIZE) {
if (ripemd->buffLen >= RIPEMD_BLOCK_SIZE) {
/* exit with error code if there's a bad buffer size in buffLen */
return BAD_STATE_E;
} /* buffLen check */