- Do not send "From" header without the host part (eg. <foo@>)
This commit is contained in:
Matej Muzila 2015-06-02 13:14:38 +02:00
parent c3b470bb37
commit 179b89f734
2 changed files with 34 additions and 2 deletions

View File

@ -0,0 +1,27 @@
diff -rup mutt-1.5.23/init.c mutt-1.5.23-new/init.c
--- mutt-1.5.23/init.c 2014-03-12 17:03:45.000000000 +0100
+++ mutt-1.5.23-new/init.c 2015-06-01 12:28:34.178727003 +0200
@@ -2890,7 +2890,8 @@ void mutt_init (int skip_sys_rc, LIST *c
{
struct passwd *pw;
struct utsname utsname;
- char *p, buffer[STRING];
+ char *p;
+ char buffer[STRING] = "";
int i, default_rc = 0, need_pause = 0;
BUFFER err;
@@ -2968,11 +2969,11 @@ void mutt_init (int skip_sys_rc, LIST *c
#ifndef DOMAIN
#define DOMAIN buffer
- if (!p && getdnsdomainname (buffer, sizeof (buffer)) == -1)
+ if (p == NULL && getdnsdomainname (buffer, sizeof (buffer)) == -1 && strlen(Hostname) == 0)
Fqdn = safe_strdup ("@");
else
#endif /* DOMAIN */
- if (*DOMAIN != '@')
+ if (*DOMAIN != '@' && strlen(DOMAIN) != 0)
{
Fqdn = safe_malloc (mutt_strlen (DOMAIN) + mutt_strlen (Hostname) + 2);
sprintf (Fqdn, "%s.%s", NONULL(Hostname), DOMAIN); /* __SPRINTF_CHECKED__ */

View File

@ -18,7 +18,7 @@
Summary: A text mode mail user agent Summary: A text mode mail user agent
Name: mutt Name: mutt
Version: 1.5.23 Version: 1.5.23
Release: 7%{?dist} Release: 8%{?dist}
Epoch: 5 Epoch: 5
# The entire source code is GPLv2+ except # The entire source code is GPLv2+ except
# pgpewrap.c setenv.c sha1.c wcwidth.c which are Public Domain # pgpewrap.c setenv.c sha1.c wcwidth.c which are Public Domain
@ -33,6 +33,7 @@ Patch3: mutt-1.5.21-syncdebug.patch
# FIXME make it to upstream # FIXME make it to upstream
Patch4: mutt-1.5.23-add_debug_option.patch Patch4: mutt-1.5.23-add_debug_option.patch
Patch5: mutt-1.5.23-sendlib.patch Patch5: mutt-1.5.23-sendlib.patch
Patch7: mutt-1.5.23-domainname.patch
Url: http://www.mutt.org/ Url: http://www.mutt.org/
Requires: mailcap, urlview Requires: mailcap, urlview
BuildRequires: ncurses-devel, gettext, automake BuildRequires: ncurses-devel, gettext, automake
@ -81,6 +82,7 @@ autoreconf --install
%patch3 -p1 -b .syncdebug %patch3 -p1 -b .syncdebug
%patch4 -p1 -b .add_debug_option %patch4 -p1 -b .add_debug_option
%patch5 -p1 -b .sendlib %patch5 -p1 -b .sendlib
%patch7 -p1 -b .domainname
sed -i -r 's/`$GPGME_CONFIG --libs`/"\0 -lgpg-error"/' configure sed -i -r 's/`$GPGME_CONFIG --libs`/"\0 -lgpg-error"/' configure
@ -186,10 +188,13 @@ ln -sf ./muttrc.5 $RPM_BUILD_ROOT%{_mandir}/man5/muttrc.local.5
%changelog %changelog
* Tue Jun 02 2015 Matej Muzila <mmuzila@redhat.com> - 5:1.5.23-8
- Resolves #1227288
- Do not send "From" header without the host part (eg. <foo@>)
* Wed Dec 03 2014 Matej Muzila <mmuzila@redhat.com> - 5:1.5.23-7 * Wed Dec 03 2014 Matej Muzila <mmuzila@redhat.com> - 5:1.5.23-7
- added patch file forgotten in last commit - added patch file forgotten in last commit
* Wed Dec 03 2014 Matej Muzila <mmuzila@redhat.com> - 5:1.5.23-6 * Wed Dec 03 2014 Matej Muzila <mmuzila@redhat.com> - 5:1.5.23-6
- resolves #1168464 (CVE-2014-9116) - resolves #1168464 (CVE-2014-9116)