summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhilip Hazel <ph10@hermes.cam.ac.uk>2005-09-12 14:03:42 +0000
committerPhilip Hazel <ph10@hermes.cam.ac.uk>2005-09-12 14:03:42 +0000
commit95d1f782e772c5dd39d718409edabe1eca92690d (patch)
tree1809e7e0651e1822060888de9c31c733606117ea /src
parentc35e155caf605c139c3e62606ff830744682c8a7 (diff)
Fix @[] prefix matching bug.
Diffstat (limited to 'src')
-rw-r--r--src/src/match.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/src/match.c b/src/src/match.c
index 18787e8ac..ace8e016e 100644
--- a/src/src/match.c
+++ b/src/src/match.c
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/match.c,v 1.9 2005/09/12 13:39:31 ph10 Exp $ */
+/* $Cambridge: exim/src/src/match.c,v 1.10 2005/09/12 14:03:42 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -174,7 +174,9 @@ if (cb->at_is_special && pattern[0] == '@')
int slen = Ustrlen(s);
if (s[0] != '[' && s[slen-1] != ']') return FAIL;
for (ip = host_find_interfaces(); ip != NULL; ip = ip->next)
- if (Ustrncmp(ip->address, s+1, slen - 2) == 0) return OK;
+ if (Ustrncmp(ip->address, s+1, slen - 2) == 0
+ && ip->address[slen - 2] == 0)
+ return OK;
return FAIL;
}