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.pull/681/head^2
parent
f8f6afd1fa
commit
78ece1b2aa
4
simeck.h
4
simeck.h
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue