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 13:06:31 +0100
commit8b4b6ac90766b11fa74fa3001778b49456adbe42 (patch)
tree523dfd39992a055328527f03843e1ea013e5aa66
parent18207bb52923bcd958c6bd2bcd363fa331a17362 (diff)
Fix ${ipv6norm:}
-rw-r--r--doc/doc-txt/ChangeLog4
-rw-r--r--src/src/host.c4
-rw-r--r--test/scripts/0000-Basic/00022
-rw-r--r--test/stdout/00022
4 files changed, 8 insertions, 4 deletions
diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog
index 68cec8531..c3fc01389 100644
--- a/doc/doc-txt/ChangeLog
+++ b/doc/doc-txt/ChangeLog
@@ -245,6 +245,10 @@ JH/51 Taint-check ACL line. Previously, only filenames (for out-of-line ACL
content) were specifically tested for. Now, also cover epxansions
rerulting in acl names and inline ACL content.
+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 18f1b54f8..5e66517e8 100644
--- a/src/src/host.c
+++ b/src/src/host.c
@@ -1201,9 +1201,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 5101be453..d3b4984fe 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 b55571cc6..845b6b4af 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