public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Fabian Groffen" <grobian@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: mail-mta/exim/, mail-mta/exim/files/
Date: Sun,  8 Oct 2017 09:24:58 +0000 (UTC)	[thread overview]
Message-ID: <1507454694.c87c9d43f1e04c6f13067946c6cdb868667e4c2f.grobian@gentoo> (raw)

commit:     c87c9d43f1e04c6f13067946c6cdb868667e4c2f
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sun Oct  8 09:02:10 2017 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sun Oct  8 09:24:54 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c87c9d43

mail-mta/exim: add patch from upstream for crash in address expando

Package-Manager: Portage-2.3.8, Repoman-2.3.3

 .../{exim-4.89-r2.ebuild => exim-4.89-r3.ebuild}   |  1 +
 .../files/exim-4.89-address-expando-crash.patch    | 85 ++++++++++++++++++++++
 2 files changed, 86 insertions(+)

diff --git a/mail-mta/exim/exim-4.89-r2.ebuild b/mail-mta/exim/exim-4.89-r3.ebuild
similarity index 99%
rename from mail-mta/exim/exim-4.89-r2.ebuild
rename to mail-mta/exim/exim-4.89-r3.ebuild
index 1f2228c4f0c..654084176e6 100644
--- a/mail-mta/exim/exim-4.89-r2.ebuild
+++ b/mail-mta/exim/exim-4.89-r3.ebuild
@@ -96,6 +96,7 @@ src_prepare() {
 	epatch "${FILESDIR}"/exim-4.76-crosscompile.patch # 266591
 	epatch "${FILESDIR}"/exim-4.89-CVE-2017-1000369.patch # 622212
 	epatch "${FILESDIR}"/${P}-transport-crash.patch # from git/in next release
+	epatch "${FILESDIR}"/${P}-address-expando-crash.patch # from git/in next release
 
 	if use maildir ; then
 		epatch "${FILESDIR}"/exim-4.20-maildir.patch

diff --git a/mail-mta/exim/files/exim-4.89-address-expando-crash.patch b/mail-mta/exim/files/exim-4.89-address-expando-crash.patch
new file mode 100644
index 00000000000..2a868490a42
--- /dev/null
+++ b/mail-mta/exim/files/exim-4.89-address-expando-crash.patch
@@ -0,0 +1,85 @@
+ignoring parts which don't match due to repo reorg post release
+
+From 1b7cf216d933b395dee691f05becca4dd44b26f7 Mon Sep 17 00:00:00 2001
+From: "Heiko Schlittermann (HS12-RIPE)" <hs@schlittermann.de>
+Date: Wed, 4 Oct 2017 22:25:45 +0200
+Subject: [PATCH] Check for proper output separator in expanding
+ ${addresses:STRING}    (Closes 2171)
+
+Better yet would be to force setting the output separator literally,
+and not after expansion of the STRING. But this would be an incompatible
+change.
+---
+ doc/doc-docbook/spec.xfpt    | 10 +++++++++-
+ src/src/expand.c             |  8 +++++++-
+ test/scripts/0000-Basic/0002 |  1 +
+ test/stdout/0002             |  1 +
+ 4 files changed, 18 insertions(+), 2 deletions(-)
+
+ignored - diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt
+ignored - index 4a8e1d0..c140945 100644
+ignored - --- a/doc/doc-docbook/spec.xfpt
+ignored - +++ b/doc/doc-docbook/spec.xfpt
+ignored - @@ -10118,7 +10118,15 @@ character. For example:
+ignored -  .code
+ignored -  ${addresses:>& Chief <ceo@up.stairs>, sec@base.ment (dogsbody)}
+ignored -  .endd
+ignored - -expands to &`ceo@up.stairs&&sec@base.ment`&. Compare the &*address*& (singular)
+ignored - +expands to &`ceo@up.stairs&&sec@base.ment`&. The string is expanded
+ignored - +first, so if the expanded string starts with >, it may change the output
+ignored - +separator unintentionally. This can be avoided by setting the output
+ignored - +separator explicitly:
+ignored - +.code
+ignored - +${addresses:>:$h_from:}
+ignored - +.endd
+ignored - +
+ignored - +Compare the &*address*& (singular)
+ignored -  expansion item, which extracts the working address from a single RFC2822
+ignored -  address. See the &*filter*&, &*map*&, and &*reduce*& items for ways of
+ignored -  processing lists.
+diff --git a/src/src/expand.c b/src/src/expand.c
+index 353b8ea..67b3d65 100644
+--- a/src/src/expand.c
++++ b/src/src/expand.c
+@@ -6797,7 +6797,13 @@ while (*s != 0)
+         int start, end, domain;  /* Not really used */
+ 
+         while (isspace(*sub)) sub++;
+-        if (*sub == '>') { *outsep = *++sub; ++sub; }
++        if (*sub == '>')
++          if (*outsep = *++sub) ++sub;
++          else {
++            expand_string_message = string_sprintf("output separator "
++              "missing in expanding ${addresses:%s}", --sub);
++            goto EXPAND_FAILED;
++          }
+         parse_allow_group = TRUE;
+ 
+         for (;;)
+ignored - diff --git a/test/scripts/0000-Basic/0002 b/test/scripts/0000-Basic/0002
+ignored - index cb0bb18..dd9cea2 100644
+ignored - --- a/test/scripts/0000-Basic/0002
+ignored - +++ b/test/scripts/0000-Basic/0002
+ignored - @@ -133,6 +133,7 @@ addresses: ${addresses:>+ Exim Person <local-part@dom.ain> (that's me),\
+ignored -  addresses: ${addresses:Exim Person <local-part@dom.ain> (that's me), \
+ignored -             xyz@abc, nullgroupname:;, group: p@q, r@s; }
+ignored -  addresses: ${addresses:local-part@dom.ain <local-part@dom.ain>}
+ignored - +addresses: ${addresses:>}
+ignored -  
+ignored -  escape:     ${escape:B7·F2ò}
+ignored -  excape8bit: ${escape8bit:undisturbed text\ttab\nnewline\ttab\\backslash \176tilde\177DEL\200\x81.}
+ignored - diff --git a/test/stdout/0002 b/test/stdout/0002
+ignored - index 5593f06..1422289 100644
+ignored - --- a/test/stdout/0002
+ignored - +++ b/test/stdout/0002
+ignored - @@ -123,6 +123,7 @@
+ignored -  > addresses: local-part@dom.ain+xyz@abc
+ignored -  > addresses: local-part@dom.ain:xyz@abc:p@q:r@s
+ignored -  > addresses: 
+ignored - +> Failed: output separator missing in expanding ${addresses:>}
+ignored -  > 
+ignored -  > escape:     B7\267F2\362
+ignored -  > excape8bit: undisturbed text	tab
+-- 
+1.9.1
+


             reply	other threads:[~2017-10-08  9:25 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-08  9:24 Fabian Groffen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-10-18 12:57 [gentoo-commits] repo/gentoo:master commit in: mail-mta/exim/, mail-mta/exim/files/ Fabian Groffen
2024-08-21  7:40 Fabian Groffen
2024-02-16 12:08 Fabian Groffen
2024-02-11 20:07 Fabian Groffen
2024-01-28 18:20 Fabian Groffen
2024-01-12 11:56 Fabian Groffen
2023-12-25 10:42 Fabian Groffen
2023-12-25 10:42 Fabian Groffen
2023-11-08  8:03 Fabian Groffen
2023-05-27  9:25 Fabian Groffen
2023-01-03 10:22 Fabian Groffen
2022-10-19  9:20 Fabian Groffen
2020-06-08  8:06 Fabian Groffen
2020-05-13  7:45 Fabian Groffen
2020-05-09  9:57 Fabian Groffen
2019-08-02  6:44 Fabian Groffen
2019-06-11  8:17 Fabian Groffen
2019-02-19 12:20 Fabian Groffen
2017-10-05 13:39 Fabian Groffen
2017-09-20  6:47 Fabian Groffen
2017-06-19 16:06 Thomas Deutschmann
2017-03-11  7:58 Fabian Groffen
2016-07-08 11:28 Fabian Groffen
2016-03-04 10:58 Fabian Groffen
2015-12-11  9:23 Fabian Groffen
2015-10-19 10:52 Sergey Popov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1507454694.c87c9d43f1e04c6f13067946c6cdb868667e4c2f.grobian@gentoo \
    --to=grobian@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox