Fixed another CID 529732.

This commit is contained in:
Martin Kinčl
2021-03-24 17:05:02 +01:00
parent ee79e1082a
commit bf1482a2d7

View File

@ -38546,7 +38546,10 @@ int wolfSSL_RSA_print(WOLFSSL_BIO* bio, WOLFSSL_RSA* rsa, int offset)
return WOLFSSL_FAILURE;
}
XMEMSET(rawKey, 0, rawLen);
mp_to_unsigned_bin(rsaElem, rawKey);
if (mp_to_unsigned_bin(rsaElem, rawKey) < 0) {
XFREE(rawKey, NULL, DYNAMIC_TYPE_TMP_BUFFER);
return WOLFSSL_FAILURE;
}
if ((word32)rawLen <= sizeof(word32)) {
idx = *(word32*)rawKey;
#ifdef BIG_ENDIAN_ORDER