diff --git a/mutt-1.5.20-bnc537141.dif b/mutt-1.5.20-bnc537141.dif new file mode 100644 index 0000000..00d524c --- /dev/null +++ b/mutt-1.5.20-bnc537141.dif @@ -0,0 +1,23 @@ +--- mutt_ssl.c ++++ mutt_ssl.c 2009-09-09 14:13:19.600635937 +0200 +@@ -681,7 +681,8 @@ static int check_host (X509 *x509cert, c + subj_alt_name = sk_GENERAL_NAME_value(subj_alt_names, i); + if (subj_alt_name->type == GEN_DNS) + { +- if ((match_found = hostname_match(hostname_ascii, ++ if (mutt_strlen(subj_alt_name->d.ia5->data) == subj_alt_name->d.ia5->length && ++ (match_found = hostname_match(hostname_ascii, + (char *)(subj_alt_name->d.ia5->data)))) + { + break; +@@ -711,7 +712,9 @@ static int check_host (X509 *x509cert, c + strfcpy (err, _("cannot get certificate common name"), errlen); + goto out; + } +- match_found = hostname_match(hostname_ascii, buf); ++ if (mutt_strlen(buf) == bufsize - 1) { ++ match_found = hostname_match(hostname_ascii, buf); ++ } + } + + if (!match_found) diff --git a/mutt.changes b/mutt.changes index 6b8bb26..50336a7 100644 --- a/mutt.changes +++ b/mutt.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Sep 9 13:43:58 CEST 2009 - werner@suse.de + +- Fix incorrectly handling of \0 character in SSL certificate (bnc#537141) + ------------------------------------------------------------------- Wed Jul 15 13:46:07 CEST 2009 - werner@suse.de diff --git a/mutt.spec b/mutt.spec index 8681816..7815b70 100644 --- a/mutt.spec +++ b/mutt.spec @@ -32,7 +32,7 @@ Requires: smtp_daemon #Requires: desktop-data-SuSE AutoReqProv: on Version: 1.5.20 -Release: 2 +Release: 3 Summary: Mail Program # ftp://ftp.mutt.org/mutt/devel/ Source0: %name-%version.tar.bz2 @@ -54,6 +54,7 @@ Patch6: patch-%version.sidebar.20090619.txt.bz2 Patch7: mutt-1.5.20.sidebar-fix.dif Patch8: mutt-1.5.19-opennfs.dif Patch9: mutt-1.5.20-gpgme_set_locale.patch +Patch10: mutt-1.5.20-bnc537141.dif BuildRoot: %{_tmppath}/%{name}-%{version}-build %global _sysconfdir %{_sysconfdir} @@ -81,6 +82,7 @@ Authors: %patch7 -p0 %patch8 -p0 %patch9 -p1 +%patch10 -p0 cp doc/Muttrc Muttrc.SuSE cp %{S:2} .