From: Philip Hazel Date: Tue, 24 Oct 2006 15:01:25 +0000 (+0000) Subject: Fix backwards compatibility bug in named ACL variables. X-Git-Tag: exim-4_64~51 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=8dce1a6f161d5f3617c38695029d485cc363fb43;p=exim.git Fix backwards compatibility bug in named ACL variables. --- diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index e1fdcff03..f5ed7f48e 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -1,4 +1,4 @@ -$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.415 2006/10/24 14:32:49 ph10 Exp $ +$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.416 2006/10/24 15:01:25 ph10 Exp $ Change log file for Exim from version 4.21 ------------------------------------------- @@ -172,6 +172,9 @@ PH/27 In a string expansion for a processed (not raw) header when multiple from the last one. Now trailing whitespace is removed from each header before concatenation. +PH/28 Fixed bug in backwards-compatibility feature of PH/09 (thanks to John + Jetmore). It would have mis-read ACL variables from pre-4.61 spool files. + Exim version 4.63 ----------------- diff --git a/src/ACKNOWLEDGMENTS b/src/ACKNOWLEDGMENTS index f20179ede..15827ea0c 100644 --- a/src/ACKNOWLEDGMENTS +++ b/src/ACKNOWLEDGMENTS @@ -1,4 +1,4 @@ -$Cambridge: exim/src/ACKNOWLEDGMENTS,v 1.60 2006/10/23 13:24:21 ph10 Exp $ +$Cambridge: exim/src/ACKNOWLEDGMENTS,v 1.61 2006/10/24 15:01:26 ph10 Exp $ EXIM ACKNOWLEDGEMENTS @@ -20,7 +20,7 @@ relatively small patches. Philip Hazel Lists created: 20 November 2002 -Last updated: 23 October 2006 +Last updated: 24 October 2006 THE OLD LIST @@ -168,7 +168,7 @@ Tom Hughes Suggested patch for $n bug in pipe command from filter Pierre Humblet Continued Cygwin support Peter Ilieve Suggested patch for lookup search bug John Jetmore Writing and maintaining the 'exipick' utility - Much helpful testing of the test suite + Much helpful testing of the test suite & elsewhere Patch for -Mset Bob Johannessen Patch for Sieve envelope tests bug Patch for negative uid/gid bug diff --git a/src/src/spool_in.c b/src/src/spool_in.c index e878b34ea..a24079dc4 100644 --- a/src/src/spool_in.c +++ b/src/src/spool_in.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/spool_in.c,v 1.17 2006/10/10 11:15:12 ph10 Exp $ */ +/* $Cambridge: exim/src/src/spool_in.c,v 1.18 2006/10/24 15:01:26 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -436,11 +436,14 @@ for (;;) else if (Ustrncmp(p, "cl ", 3) == 0) { int index, count; - uschar name[4]; + uschar name[20]; /* Need plenty of space for %d format */ tree_node *node; if (sscanf(CS big_buffer + 5, "%d %d", &index, &count) != 2) goto SPOOL_FORMAT_ERROR; - (void) string_format(name, 4, "%c%d", (index < 10 ? 'c' : 'm'), index); + if (index < 10) + (void) string_format(name, sizeof(name), "%c%d", 'c', index); + else if (index < 20) /* ignore out-of-range index */ + (void) string_format(name, sizeof(name), "%c%d", 'm', index - 10); node = acl_var_create(name); node->data.ptr = store_get(count + 1); if (fread(node->data.ptr, 1, count+1, f) < count) goto SPOOL_READ_ERROR;