From 7409de7bc28ff8847c9d71d8c3e35e1968d59d60 Mon Sep 17 00:00:00 2001 From: Jussi Kivilinna Date: Sat, 21 Sep 2013 13:54:38 +0300 Subject: gostr3411_94: set better burn stack depth estimate * cipher/gost28147.c (_gcry_gost_enc_one): Account function stack to burn stack depth. * cipher/gostr3411-94.c (max): New macro. (do_hash_step, transform): Return stack burn depth. -- Signed-off-by: Jussi Kivilinna --- cipher/gost28147.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cipher/gost28147.c') diff --git a/cipher/gost28147.c b/cipher/gost28147.c index 862e7d66..c669148d 100644 --- a/cipher/gost28147.c +++ b/cipher/gost28147.c @@ -168,7 +168,7 @@ unsigned int _gcry_gost_enc_one (GOST28147_context *c, const byte *key, byte *out, byte *in) { gost_setkey (c, key, 32); - return gost_encrypt_block (c, out, in); + return gost_encrypt_block (c, out, in) + 5 * sizeof(void *); } static unsigned int -- cgit v1.2.1