summaryrefslogtreecommitdiff
path: root/pith/smkeys.h
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2018-12-06 16:23:29 -0700
committerEduardo Chappa <chappa@washington.edu>2018-12-06 16:23:29 -0700
commit997ceda29bf9c8e54a10f5c0cec7297b067ad5e7 (patch)
tree3956d8b952566bcf42b6ffe7068562728be2e408 /pith/smkeys.h
parentd566a9e20e2712617661b9fb00689534ec3be7f4 (diff)
downloadalpine-997ceda29bf9c8e54a10f5c0cec7297b067ad5e7.tar.xz
* Fix a crash in the S/MIME configuration screen when a user turned off S/MIME,
and then reenabled it. This crash was due to a double free of memory. To avoid this in the future, we created a function free_x509_store(), which whenever called, will only free memory once. A similar crash would occur when one attempted to enter the S/MIME configuration screen if S/MIME was turned off. In this case, Alpine would try to dereference a null pointer.
Diffstat (limited to 'pith/smkeys.h')
-rw-r--r--pith/smkeys.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/pith/smkeys.h b/pith/smkeys.h
index e37eea3b..b9c256f6 100644
--- a/pith/smkeys.h
+++ b/pith/smkeys.h
@@ -72,6 +72,7 @@ typedef struct personal_cert {
/* exported protoypes */
int add_certs_in_dir(X509_LOOKUP *lookup, char *path, char *ext, CertList **cdata);
X509_STORE *get_ca_store(void);
+void free_x509_store(X509_STORE **);
PERSONAL_CERT *get_personal_certs(char *d);
X509 *get_cert_for(char *email, WhichCerts ctype, int tolower);
void save_cert_for(char *email, X509 *cert, WhichCerts ctype);