1 commit beffd0f44d8018be15af4f6159a7cf589f062eb5
3 Date: Mon Jan 28 18:24:07 2008 +0000
5 Bugzilla 662: Fix stack corruption before exec() in daemon.c.
7 diff --git a/src/daemon.c b/src/daemon.c
8 index 4b8ca4d..427ef41 100644
12 -/* $Cambridge: exim/exim-src/src/daemon.c,v 1.24 2007/06/27 11:01:51 ph10 Exp $ */
13 +/* $Cambridge: exim/exim-src/src/daemon.c,v 1.25 2008/01/28 18:24:07 fanf2 Exp $ */
15 /*************************************************
16 * Exim - an Internet mail transport agent *
17 @@ -1661,7 +1661,7 @@ for (;;)
25 signal(SIGALRM, SIG_DFL);
26 commit d825f0e6652a97b194daf4bc8b8eae445f770a0d
28 Date: Fri Dec 12 14:36:37 2008 +0000
30 Buffer overrun fix. fixes: bug #787
32 diff --git a/src/string.c b/src/string.c
33 index 7f2447b..ef39cac 100644
37 -/* $Cambridge: exim/exim-src/src/string.c,v 1.13 2007/02/26 14:07:04 ph10 Exp $ */
38 +/* $Cambridge: exim/exim-src/src/string.c,v 1.14 2008/12/12 14:36:37 nm4 Exp $ */
40 /*************************************************
41 * Exim - an Internet mail transport agent *
42 @@ -1267,10 +1267,17 @@ while (*fp != 0)
43 not OK, add part of the string (debugging uses this to show as
51 if (p >= last - width)
54 width = precision = last - p - 1;
55 + if (width < 0) width = 0;
56 + if (precision < 0) precision = 0;
58 sprintf(CS p, "%*.*s", width, precision, s);