summaryrefslogtreecommitdiff
path: root/polynomi.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 /polynomi.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 'polynomi.cpp')
-rw-r--r--polynomi.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/polynomi.cpp b/polynomi.cpp
index bf8904c0..b88545bc 100644
--- a/polynomi.cpp
+++ b/polynomi.cpp
@@ -475,7 +475,7 @@ void RingOfPolynomialsOver<T>::CalculateAlpha(std::vector<CoefficientType> &alph
template <class T>
typename RingOfPolynomialsOver<T>::Element RingOfPolynomialsOver<T>::Interpolate(const CoefficientType x[], const CoefficientType y[], unsigned int n) const
{
- assert(n > 0);
+ CRYPTOPP_ASSERT(n > 0);
std::vector<CoefficientType> alpha(n);
CalculateAlpha(alpha, x, y, n);
@@ -497,7 +497,7 @@ typename RingOfPolynomialsOver<T>::Element RingOfPolynomialsOver<T>::Interpolate
template <class T>
typename RingOfPolynomialsOver<T>::CoefficientType RingOfPolynomialsOver<T>::InterpolateAt(const CoefficientType &position, const CoefficientType x[], const CoefficientType y[], unsigned int n) const
{
- assert(n > 0);
+ CRYPTOPP_ASSERT(n > 0);
std::vector<CoefficientType> alpha(n);
CalculateAlpha(alpha, x, y, n);
@@ -527,7 +527,7 @@ void PrepareBulkPolynomialInterpolation(const Ring &ring, Element *w, const Elem
template <class Ring, class Element>
void PrepareBulkPolynomialInterpolationAt(const Ring &ring, Element *v, const Element &position, const Element x[], const Element w[], unsigned int n)
{
- assert(n > 0);
+ CRYPTOPP_ASSERT(n > 0);
std::vector<Element> a(2*n-1);
unsigned int i;