break out of loop on failure instead of return

This commit is contained in:
John Bland
2024-03-25 11:48:43 -04:00
parent fb784a2ac9
commit 305f87561d

View File

@ -26018,9 +26018,8 @@ int wc_RsaKeyToDer(RsaKey* key, byte* output, word32 inLen)
#else #else
keyInt = GetRsaInt(key, i); keyInt = GetRsaInt(key, i);
ret = mp_unsigned_bin_size(keyInt); ret = mp_unsigned_bin_size(keyInt);
if (ret < 0) { if (ret < 0)
return ret; break;
}
ret = 0; ret = 0;
/* This won't overrun output due to the outLen check above */ /* This won't overrun output due to the outLen check above */
mpSz = SetASNIntMP(keyInt, MAX_RSA_INT_SZ, output + j); mpSz = SetASNIntMP(keyInt, MAX_RSA_INT_SZ, output + j);