ph10 2005/02/17 09:49:08 GMT
Modified files:
exim-doc/doc-txt ChangeLog
exim-src/src sieve.c
Log:
Patch for "vacation" bug in Sieve handling.
Revision Changes Path
1.82 +3 -0 exim/exim-doc/doc-txt/ChangeLog
1.6 +5 -1 exim/exim-src/src/sieve.c
Index: ChangeLog
===================================================================
RCS file: /home/cvs/exim/exim-doc/doc-txt/ChangeLog,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -r1.81 -r1.82
--- ChangeLog 16 Feb 2005 16:40:22 -0000 1.81
+++ ChangeLog 17 Feb 2005 09:49:08 -0000 1.82
@@ -1,4 +1,4 @@
-$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.81 2005/02/16 16:40:22 ph10 Exp $
+$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.82 2005/02/17 09:49:08 ph10 Exp $
Change log file for Exim from version 4.21
-------------------------------------------
@@ -385,6 +385,9 @@
tables).
82. Updated OS/Makefile-AIX as per message from Mike Meredith.
+
+83. Patch from Sieve maintainer to fix unterminated string problem in
+ "vacation" handling.
----------------------------------------------------
Index: sieve.c
===================================================================
RCS file: /home/cvs/exim/exim-src/src/sieve.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- sieve.c 15 Feb 2005 15:48:46 -0000 1.5
+++ sieve.c 17 Feb 2005 09:49:08 -0000 1.6
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/exim-src/src/sieve.c,v 1.5 2005/02/15 15:48:46 ph10 Exp $ */
+/* $Cambridge: exim/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 @@
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 @@
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
{