aboutsummaryrefslogtreecommitdiffstats
path: root/src/block/mars/mars.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/block/mars/mars.cpp')
-rw-r--r--src/block/mars/mars.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/block/mars/mars.cpp b/src/block/mars/mars.cpp
index 57a224fac..71cef3ee8 100644
--- a/src/block/mars/mars.cpp
+++ b/src/block/mars/mars.cpp
@@ -320,9 +320,10 @@ void MARS::decrypt_n(const byte in[], byte out[], u32bit blocks) const
*/
void MARS::key_schedule(const byte key[], u32bit length)
{
- SecureVector<u32bit, 15> T;
+ SecureVector<u32bit> T(15);
for(u32bit j = 0; j != length / 4; ++j)
T[j] = load_le<u32bit>(key, j);
+
T[length / 4] = length / 4;
for(u32bit j = 0; j != 4; ++j)