summaryrefslogtreecommitdiff
path: root/salsa.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 /salsa.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 'salsa.cpp')
-rw-r--r--salsa.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/salsa.cpp b/salsa.cpp
index ddf779ae..85c33545 100644
--- a/salsa.cpp
+++ b/salsa.cpp
@@ -63,7 +63,7 @@ void Salsa20_Policy::CipherSetKey(const NameValuePairs &params, const byte *key,
void Salsa20_Policy::CipherResynchronize(byte *keystreamBuffer, const byte *IV, size_t length)
{
CRYPTOPP_UNUSED(keystreamBuffer), CRYPTOPP_UNUSED(length);
- assert(length==8);
+ CRYPTOPP_ASSERT(length==8);
GetBlock<word32, LittleEndian> get(IV);
get(m_state[14])(m_state[11]);
@@ -592,7 +592,7 @@ void XSalsa20_Policy::CipherSetKey(const NameValuePairs &params, const byte *key
void XSalsa20_Policy::CipherResynchronize(byte *keystreamBuffer, const byte *IV, size_t length)
{
CRYPTOPP_UNUSED(keystreamBuffer), CRYPTOPP_UNUSED(length);
- assert(length==24);
+ CRYPTOPP_ASSERT(length==24);
word32 x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15;