summaryrefslogtreecommitdiff
path: root/simeck.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2018-07-03 22:41:04 -0400
committerJeffrey Walton <noloader@gmail.com>2018-07-03 22:41:04 -0400
commit78ece1b2aab0547e94c492d86b695f08501fbd74 (patch)
treebe87daaf9f10e60883d2d734088a4d2466db0fee /simeck.h
parentf8f6afd1fac9ce2b2ca51fb5a97753a7e7cb1d19 (diff)
downloadcryptopp-git-78ece1b2aab0547e94c492d86b695f08501fbd74.tar.gz
Fix temporary array size (GH #675)
cryptest.sh and UBsan caught a "secblock.h:389:4: runtime error: load of value 206, which is not a valid value for type 'bool'". m_t[4] is accessed in UncheckedSetKey. The extra m_t[] element was inadvertently removed when ProcessAndXorBlock no longer used it.
Diffstat (limited to 'simeck.h')
-rw-r--r--simeck.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/simeck.h b/simeck.h
index d3feb452..40af2472 100644
--- a/simeck.h
+++ b/simeck.h
@@ -64,7 +64,7 @@ public:
void UncheckedSetKey(const byte *userKey, unsigned int keyLength, const NameValuePairs &params);
FixedSizeSecBlock<word16, ROUNDS> m_rk;
- mutable FixedSizeSecBlock<word16, 4> m_t;
+ mutable FixedSizeSecBlock<word16, 5> m_t;
};
/// \brief Provides implementation for encryption transformation
@@ -113,7 +113,7 @@ public:
void UncheckedSetKey(const byte *userKey, unsigned int keyLength, const NameValuePairs &params);
FixedSizeSecBlock<word32, ROUNDS> m_rk;
- mutable FixedSizeSecBlock<word32, 4> m_t;
+ mutable FixedSizeSecBlock<word32, 5> m_t;
};
/// \brief Provides implementation for encryption transformation