diff options
author | Jeffrey Walton <noloader@gmail.com> | 2018-07-03 22:41:04 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2018-07-03 22:41:04 -0400 |
commit | 78ece1b2aab0547e94c492d86b695f08501fbd74 (patch) | |
tree | be87daaf9f10e60883d2d734088a4d2466db0fee /simeck.h | |
parent | f8f6afd1fac9ce2b2ca51fb5a97753a7e7cb1d19 (diff) | |
download | cryptopp-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.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -64,7 +64,7 @@ public: void UncheckedSetKey(const byte *userKey, unsigned int keyLength, const NameValuePairs ¶ms);
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 ¶ms);
FixedSizeSecBlock<word32, ROUNDS> m_rk;
- mutable FixedSizeSecBlock<word32, 4> m_t;
+ mutable FixedSizeSecBlock<word32, 5> m_t;
};
/// \brief Provides implementation for encryption transformation
|