From ae67ebf820817f01e77471b5bc7da9885b159bba Mon Sep 17 00:00:00 2001 From: Eduardo Chappa Date: Tue, 22 May 2018 00:37:54 -0600 Subject: [PATCH] * error by 1 introduced in function that decrypts files, makes Alpine not decrypt the password file correctly. Reported by Kyle George. --- pith/smime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pith/smime.c b/pith/smime.c index 3888db4..6e55a00 100644 --- a/pith/smime.c +++ b/pith/smime.c @@ -3284,7 +3284,7 @@ decrypt_file(char *fp, int *rv, PERSONAL_CERT *pc) len = BIO_get_mem_data(out, &tmp); text = fs_get((len+1)*sizeof(char)); strncpy(text, tmp, len); - text[len-1] = '\0'; + text[len] = '\0'; BIO_free(out); } else q_status_message1(SM_ORDER, 1, 1, _("Error decrypting: %s"), -- 2.11.4.GIT