summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhilip Hazel <ph10@hermes.cam.ac.uk>2005-02-17 09:49:08 +0000
committerPhilip Hazel <ph10@hermes.cam.ac.uk>2005-02-17 09:49:08 +0000
commit1ee1cef2842f879d6b3c94a3b978e3dee6ad4e6c (patch)
treed55f47c766c58d1074eeb8d4cfcd584dfe304d95 /src
parent4e01f9d6a10601a4f89b0bd2bd2642cda95a92dd (diff)
Patch for "vacation" bug in Sieve handling.
Diffstat (limited to 'src')
-rw-r--r--src/src/sieve.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/src/sieve.c b/src/src/sieve.c
index b5053c796..22bc64fd7 100644
--- a/src/src/sieve.c
+++ b/src/src/sieve.c
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/sieve.c,v 1.5 2005/02/15 15:48:46 ph10 Exp $ */
+/* $Cambridge: exim/src/src/sieve.c,v 1.6 2005/02/17 09:49:08 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -2486,6 +2486,7 @@ while (*filter->pc)
start=capacity;
once=string_cat(filter->vacation_directory,&capacity,&start,US"/",1);
once=string_cat(once,&capacity,&start,hexdigest,33);
+ once[start] = '\0';
/* process subject */
@@ -2541,10 +2542,13 @@ while (*filter->pc)
capacity = 0;
start = 0;
addr->reply->headers = string_cat(NULL,&capacity,&start,reason.character,mime_body-reason.character);
+ addr->reply->headers[start] = '\0';
capacity = 0;
start = 0;
- if (mime_body<reason_end) mime_body+=sizeof(nlnl)-1;
+ if (mime_body+(sizeof(nlnl)-1)<reason_end) mime_body+=sizeof(nlnl)-1;
+ else mime_body=reason_end-1;
addr->reply->text = string_cat(NULL,&capacity,&start,mime_body,reason_end-mime_body);
+ addr->reply->text[start] = '\0';
}
else
{