From 6429e3a84ad9c24740103c1fc35eeb831b79ab26 Mon Sep 17 00:00:00 2001 From: Federico Kircheis Date: Sat, 3 Mar 2018 09:35:26 +0100 Subject: [PATCH] Reduce variable scope - imap/auth_cram.c --- imap/auth_cram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imap/auth_cram.c b/imap/auth_cram.c index d38f5b847..5e98baf4e 100644 --- a/imap/auth_cram.c +++ b/imap/auth_cram.c @@ -57,7 +57,6 @@ static void hmac_md5(const char *password, char *challenge, unsigned char *respo struct Md5Ctx ctx; unsigned char ipad[MD5_BLOCK_LEN], opad[MD5_BLOCK_LEN]; unsigned char secret[MD5_BLOCK_LEN + 1]; - unsigned char hash_passwd[MD5_DIGEST_LEN]; size_t secret_len; secret_len = strlen(password); @@ -66,6 +65,7 @@ static void hmac_md5(const char *password, char *challenge, unsigned char *respo * digests */ if (secret_len > MD5_BLOCK_LEN) { + unsigned char hash_passwd[MD5_DIGEST_LEN]; mutt_md5_bytes(password, secret_len, hash_passwd); mutt_str_strfcpy((char *) secret, (char *) hash_passwd, MD5_DIGEST_LEN); secret_len = MD5_DIGEST_LEN; -- 2.40.0