From: Philip Hazel Date: Thu, 17 Feb 2005 09:49:08 +0000 (+0000) Subject: Patch for "vacation" bug in Sieve handling. X-Git-Tag: exim-4_50~5 X-Git-Url: https://git.exim.org/users/heiko/exim.git/commitdiff_plain/1ee1cef2842f879d6b3c94a3b978e3dee6ad4e6c?ds=sidebyside Patch for "vacation" bug in Sieve handling. --- diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index b01485f83..024f6a5c3 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -1,4 +1,4 @@ -$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.81 2005/02/16 16:40:22 ph10 Exp $ +$Cambridge: 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 ------------------------------------------- @@ -386,6 +386,9 @@ Exim version 4.50 82. Updated OS/Makefile-AIX as per message from Mike Meredith. +83. Patch from Sieve maintainer to fix unterminated string problem in + "vacation" handling. + ---------------------------------------------------- See the note above about the 4.44 and 4.50 releases. 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_bodyreply->text = string_cat(NULL,&capacity,&start,mime_body,reason_end-mime_body); + addr->reply->text[start] = '\0'; } else {