summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhilip Hazel <ph10@hermes.cam.ac.uk>2007-08-29 13:58:57 +0000
committerPhilip Hazel <ph10@hermes.cam.ac.uk>2007-08-29 13:58:57 +0000
commitce9f225cdc4df2e3f2122b67e297b9f4aef1edb7 (patch)
tree6d27fe48730686f49b61a84f4b7336b87c5096ba /src
parent7353285c15cfdcab0567dc8a0d55ff4720a7a01c (diff)
Guard against buffer overflow in moan_check_errorcopy().
Diffstat (limited to 'src')
-rw-r--r--src/src/moan.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/src/moan.c b/src/src/moan.c
index 5ef5fe42c..0080e57be 100644
--- a/src/src/moan.c
+++ b/src/src/moan.c
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/moan.c,v 1.8 2007/02/06 11:11:40 ph10 Exp $ */
+/* $Cambridge: exim/src/src/moan.c,v 1.9 2007/08/29 13:58:57 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -610,10 +610,7 @@ while ((item = string_nextinlist(&listptr, &sep, buffer, sizeof(buffer)))
if (match_address_list(recipient, TRUE, TRUE, &pattern, NULL, 0, UCHAR_MAX+1,
NULL) == OK)
{
- uschar temp[256];
- Ustrncpy(temp, localpart, llen);
- temp[llen] = 0;
- deliver_localpart = temp;
+ deliver_localpart = string_copyn(localpart, llen);
deliver_domain = domain;
yield = expand_string_copy(newaddress);
deliver_domain = deliver_localpart = NULL;