summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTony Finch <dot@dotat.at>2012-12-06 19:11:28 +0000
committerTony Finch <dot@dotat.at>2012-12-06 19:11:28 +0000
commit326cdc37059420d73ba121daaf74def9b53b9e3b (patch)
treeab32e246d1a1657a02f328ca152ae95e3bd6aafd /src
parentd4f09789499b5a665a0e79d6ed0086806fc7b648 (diff)
Correct gecos expansion when From: is a prefix of the username.
Test 0254 submits a message to Exim with the header Resent-From: f When I ran the test suite under the user fanf2, Exim expanded the header to contain my full name, whereas it should have added a Resent-Sender: header. It erroneously treats any prefix of the username as equal to the username. This change corrects that bug.
Diffstat (limited to 'src')
-rw-r--r--src/src/receive.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/src/receive.c b/src/src/receive.c
index 1943a74c7..4d77bcd96 100644
--- a/src/src/receive.c
+++ b/src/src/receive.c
@@ -2037,7 +2037,7 @@ for (h = header_list->next; h != NULL; h = h->next)
{
uschar *s = Ustrchr(h->text, ':') + 1;
while (isspace(*s)) s++;
- if (strncmpic(s, originator_login, h->slen - (s - h->text) - 1) == 0)
+ if (strcmpic(s, originator_login) == 0)
{
uschar *name = is_resent? US"Resent-From" : US"From";
header_add(htype_from, "%s: %s <%s@%s>\n", name, originator_name,