mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 12:14:38 +02:00
fix NO_MALLOC guard in an error case
This commit is contained in:
@@ -1759,7 +1759,9 @@ static int RsaUnPad_PSS(byte *pkcsBlock, unsigned int pkcsBlockLen,
|
|||||||
{
|
{
|
||||||
for (i = 0; i < maskLen - 1 - saltLen; i++) {
|
for (i = 0; i < maskLen - 1 - saltLen; i++) {
|
||||||
if (tmp[i] != pkcsBlock[i]) {
|
if (tmp[i] != pkcsBlock[i]) {
|
||||||
|
#if !defined(WOLFSSL_NO_MALLOC) || defined(WOLFSSL_STATIC_MEMORY)
|
||||||
XFREE(tmp, heap, DYNAMIC_TYPE_RSA_BUFFER);
|
XFREE(tmp, heap, DYNAMIC_TYPE_RSA_BUFFER);
|
||||||
|
#endif
|
||||||
WOLFSSL_MSG("RsaUnPad_PSS: Padding Error Match");
|
WOLFSSL_MSG("RsaUnPad_PSS: Padding Error Match");
|
||||||
return PSS_SALTLEN_E;
|
return PSS_SALTLEN_E;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user