summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2018-05-22 00:37:54 -0600
committerEduardo Chappa <chappa@washington.edu>2018-05-22 00:37:54 -0600
commitae67ebf820817f01e77471b5bc7da9885b159bba (patch)
tree46eaea9447005f2988d5211e357f71fb7491d6f3
parent854ecc5e92a29f14983fc3c9c2edeb4980949568 (diff)
downloadalpine-ae67ebf820817f01e77471b5bc7da9885b159bba.tar.xz
* error by 1 introduced in function that decrypts files, makes Alpine not
decrypt the password file correctly. Reported by Kyle George.
-rw-r--r--pith/smime.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pith/smime.c b/pith/smime.c
index 3888db4d..6e55a00d 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"),