summaryrefslogtreecommitdiff
path: root/ida.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2016-09-16 11:27:15 -0400
committerJeffrey Walton <noloader@gmail.com>2016-09-16 11:27:15 -0400
commit399a1546de71f41598c15edada28e7f0d616f541 (patch)
tree530160789358a3303be180df2d8529c82782156b /ida.cpp
parentfca5fbb36169a7522e6c533df9c322d47e3dc6bb (diff)
downloadcryptopp-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.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/ida.cpp b/ida.cpp
index 3c04ce61..64bcf968 100644
--- a/ida.cpp
+++ b/ida.cpp
@@ -22,7 +22,7 @@ void RawIDA::IsolatedInitialize(const NameValuePairs &parameters)
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 &parameters)
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);