diff options
author | Eduardo Chappa <chappa@washington.edu> | 2018-12-06 16:23:29 -0700 |
---|---|---|
committer | Eduardo Chappa <chappa@washington.edu> | 2018-12-06 16:23:29 -0700 |
commit | 997ceda29bf9c8e54a10f5c0cec7297b067ad5e7 (patch) | |
tree | 3956d8b952566bcf42b6ffe7068562728be2e408 /alpine | |
parent | d566a9e20e2712617661b9fb00689534ec3be7f4 (diff) | |
download | alpine-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 'alpine')
-rw-r--r-- | alpine/smime.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/alpine/smime.c b/alpine/smime.c index 641ef264..dd73ba03 100644 --- a/alpine/smime.c +++ b/alpine/smime.c @@ -990,7 +990,8 @@ smime_config_init_display(struct pine *ps, CONF_S **ctmp, CONF_S **first_line) #endif /* APPLEKEYCHAIN */ - if(SMHOLDERTYPE(Private) == Keychain + if(ps_global->smime + && SMHOLDERTYPE(Private) == Keychain && SMHOLDERTYPE(Public) == Keychain && SMHOLDERTYPE(CACert) == Keychain) return; |