summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2021-05-04 13:06:31 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2021-05-04 14:02:56 +0100
commited64b5c2f0f44db27ae48128fc97d5ad8406a28e (patch)
tree07bf3300920b728cfe965113a7d26dfc865e16f8
parent037b688902e64a04cd81a90ad7ae070d78284036 (diff)
downloadexim4-ed64b5c2f0f44db27ae48128fc97d5ad8406a28e.tar.gz
Fix ${ipv6norm:}
(cherry picked from commit 8b4b6ac90766b11fa74fa3001778b49456adbe42)
-rw-r--r--doc/doc-txt/ChangeLog3
-rw-r--r--src/src/host.c4
-rw-r--r--test/scripts/0000-Basic/00022
-rw-r--r--test/stdout/00022
4 files changed, 7 insertions, 4 deletions
diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog
index 0792062ba..59a3aa8fd 100644
--- a/doc/doc-txt/ChangeLog
+++ b/doc/doc-txt/ChangeLog
@@ -163,6 +163,9 @@ JH/44 Bug 2701: Fix list-expansion of dns_ipv4_lookup. Previously, it did
dnssec_require_domains, dnssec_request_domains, srv_fail_domains,
mx_fail_domains.
+JH/52 Fix ${ip6norm:} operator. Previously, any trailing line text was dropped,
+ making it unusable in complex expressions.
+
Exim version 4.94
-----------------
diff --git a/src/src/host.c b/src/src/host.c
index dbc7ce20d..ee9d323a7 100644
--- a/src/src/host.c
+++ b/src/src/host.c
@@ -1197,9 +1197,9 @@ for (c = buffer, k = -1, i = 0; i < 8; i++)
c++;
}
-c[-1] = '\0'; /* drop trailing colon */
+*--c = '\0'; /* drop trailing colon */
-/* debug_printf("%s: D k %d <%s> <%s>\n", __FUNCTION__, k, d, d + 2*(k+1)); */
+/* debug_printf("%s: D k %d <%s> <%s>\n", __FUNCTION__, k, buffer, buffer + 2*(k+1)); */
if (k >= 0)
{ /* collapse */
c = d + 2*(k+1);
diff --git a/test/scripts/0000-Basic/0002 b/test/scripts/0000-Basic/0002
index 0a24fe988..7734b7153 100644
--- a/test/scripts/0000-Basic/0002
+++ b/test/scripts/0000-Basic/0002
@@ -258,7 +258,7 @@ ipv6norm: ${ipv6norm:2a00::1}
ipv6norm: ${ipv6norm:2a00:eadf:0000:0000:0000:0000:0001:0000}
ipv6norm: ${ipv6norm:2a00:eadf:0000:0001:0000:0000:0000:0000}
ipv6norm: ${ipv6norm:2a00:0:0:0::}
-ipv6norm: ${ipv6norm:2a00:2:3:4:5:6:7:8}
+ipv6norm: ${ipv6norm:2a00:2:3:4:5:6:7:8}trailing_text
nhash: ${nhash_24:monty} ${nhash_8_63:monty python}
lc/uc: ${lc:The Quick} ${uc: Brown Fox}
length: ${length_10:The quick brown fox} ${l_10:abc}
diff --git a/test/stdout/0002 b/test/stdout/0002
index 2cb01372e..0498c7c7a 100644
--- a/test/stdout/0002
+++ b/test/stdout/0002
@@ -240,7 +240,7 @@ newline tab\134backslash ~tilde\177DEL\200\201.
> ipv6norm: 2a00:eadf::1:0
> ipv6norm: 2a00:eadf:0:1::
> ipv6norm: 2a00::
-> ipv6norm: 2a00:2:3:4:5:6:7:8
+> ipv6norm: 2a00:2:3:4:5:6:7:8trailing_text
> nhash: 19 0/61
> lc/uc: the quick BROWN FOX
> length: The quick abc