diff options
author | Eduardo Chappa <chappa@washington.edu> | 2018-04-21 11:40:19 -0600 |
---|---|---|
committer | Eduardo Chappa <chappa@washington.edu> | 2018-04-21 11:40:19 -0600 |
commit | 784b14806812d40f8258b78b20a5d54a0507ffb1 (patch) | |
tree | 46ba9f0cd1ef9a9c40d70a4fb76fa32d14f32b20 | |
parent | 5ac14c41871d6e9b4bab20d57fe6398733a96911 (diff) | |
download | alpine-784b14806812d40f8258b78b20a5d54a0507ffb1.tar.xz |
* The list of public certificates is freed before it is reused when
a signature fails to verify. This causes Alpine to crash. Patch
submitted by Linus Torvalds.
-rw-r--r-- | pith/smime.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pith/smime.c b/pith/smime.c index 9cab8ee2..e899c9c8 100644 --- a/pith/smime.c +++ b/pith/smime.c @@ -2832,8 +2832,6 @@ do_signature_verify(PKCS7 *p7, BIO *in, BIO *out, int silent) result = PKCS7_verify(p7, otherCerts, s_cert_store, in, out, flags); - sk_X509_pop_free(otherCerts, X509_free); - if(result){ q_status_message(SM_ORDER, 1, 1, _("S/MIME signature verified ok")); } @@ -2851,6 +2849,8 @@ do_signature_verify(PKCS7 *p7, BIO *in, BIO *out, int silent) _("Couldn't verify S/MIME signature: %s"), (char*) openssl_error_string()); } + sk_X509_pop_free(otherCerts, X509_free); + return result; } |