* cipher/gostr3411-94.c (gost3411_final): Fix loop
--
The maximum iteration count for filling the l (bit length) array was
incrrectly set to 32 (missed that in u8->u32 refactoring). This was
not resulting in stack corruption, since nblocks variable would be
exausted earlier compared to 8 32-bit values (the size of the array).
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
l[0] |= nblocks << 8;
nblocks >>= 24;
- for (i = 1; i < 32 && nblocks != 0; i++)
+ for (i = 1; i < 8 && nblocks != 0; i++)
{
l[i] = nblocks;
nblocks >>= 24;