diff options
author | Jeffrey Walton <noloader@gmail.com> | 2016-09-16 11:27:15 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2016-09-16 11:27:15 -0400 |
commit | 399a1546de71f41598c15edada28e7f0d616f541 (patch) | |
tree | 530160789358a3303be180df2d8529c82782156b /ida.cpp | |
parent | fca5fbb36169a7522e6c533df9c322d47e3dc6bb (diff) | |
download | cryptopp-git-399a1546de71f41598c15edada28e7f0d616f541.tar.gz |
Add CRYPTOPP_ASSERT (Issue 277, CVE-2016-7420)
trap.h and CRYPTOPP_ASSERT has existed for over a year in Master. We deferred on the cut-over waiting for a minor version bump (5.7). We have to use it now due to CVE-2016-7420
Diffstat (limited to 'ida.cpp')
-rw-r--r-- | ida.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -22,7 +22,7 @@ void RawIDA::IsolatedInitialize(const NameValuePairs ¶meters) if (!parameters.GetIntValue("RecoveryThreshold", m_threshold))
throw InvalidArgument("RawIDA: missing RecoveryThreshold argument");
- assert(m_threshold > 0);
+ CRYPTOPP_ASSERT(m_threshold > 0);
if (m_threshold <= 0)
throw InvalidArgument("RawIDA: RecoveryThreshold must be greater than 0");
@@ -43,7 +43,7 @@ void RawIDA::IsolatedInitialize(const NameValuePairs ¶meters) else
{
int nShares = parameters.GetIntValueWithDefault("NumberOfShares", m_threshold);
- assert(nShares > 0);
+ CRYPTOPP_ASSERT(nShares > 0);
if (nShares <= 0) {nShares = m_threshold;}
for (unsigned int i=0; i< (unsigned int)(nShares); i++)
AddOutputChannel(i);
@@ -152,7 +152,7 @@ void RawIDA::AddOutputChannel(word32 channelId) void RawIDA::PrepareInterpolation()
{
- assert(m_inputChannelIds.size() == size_t(m_threshold));
+ CRYPTOPP_ASSERT(m_inputChannelIds.size() == size_t(m_threshold));
PrepareBulkPolynomialInterpolation(field, m_w.begin(), &(m_inputChannelIds[0]), (unsigned int)(m_threshold));
for (unsigned int i=0; i<m_outputChannelIds.size(); i++)
ComputeV(i);
|