summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/src/exim.c4
-rw-r--r--src/src/globals.c4
-rw-r--r--src/src/transports/appendfile.c19
3 files changed, 23 insertions, 4 deletions
diff --git a/src/src/exim.c b/src/src/exim.c
index 87239c569..5b0eb0335 100644
--- a/src/src/exim.c
+++ b/src/src/exim.c
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/exim.c,v 1.31 2006/02/07 11:19:00 ph10 Exp $ */
+/* $Cambridge: exim/src/src/exim.c,v 1.32 2006/02/10 16:29:20 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -1012,6 +1012,8 @@ if (fixed_never_users[0] > 0)
fprintf(f, "%d:", (unsigned int)fixed_never_users[i]);
fprintf(f, "%d\n", (unsigned int)fixed_never_users[i]);
}
+
+fprintf(f, "Size of off_t: %d\n", sizeof(off_t));
}
diff --git a/src/src/globals.c b/src/src/globals.c
index e609f3020..275b7c8f0 100644
--- a/src/src/globals.c
+++ b/src/src/globals.c
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/globals.c,v 1.46 2006/02/10 14:25:43 ph10 Exp $ */
+/* $Cambridge: exim/src/src/globals.c,v 1.47 2006/02/10 16:29:20 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -1224,7 +1224,7 @@ uschar *warnmsg_delay = NULL;
uschar *warnmsg_recipients = NULL;
BOOL write_rejectlog = TRUE;
-uschar *version_copyright = US"Copyright (c) University of Cambridge 2005";
+uschar *version_copyright = US"Copyright (c) University of Cambridge 2006";
uschar *version_date = US"?";
uschar *version_cnumber = US"????";
uschar *version_string = US"?";
diff --git a/src/src/transports/appendfile.c b/src/src/transports/appendfile.c
index d336ada04..bb5d90bcb 100644
--- a/src/src/transports/appendfile.c
+++ b/src/src/transports/appendfile.c
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/transports/appendfile.c,v 1.11 2006/02/07 11:19:02 ph10 Exp $ */
+/* $Cambridge: exim/src/src/transports/appendfile.c,v 1.12 2006/02/10 16:29:20 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -271,6 +271,7 @@ mailbox_filecount */
for (i = 0; i < 5; i++)
{
double d;
+ uschar *which = NULL;
if (q == NULL) d = default_value; else
{
@@ -316,33 +317,49 @@ for (i = 0; i < 5; i++)
}
}
+ /* Set each value, checking for possible overflow. */
+
switch (i)
{
case 0:
+ if (d >= 2.0*1024.0*1024.0*1024.0 && sizeof(off_t) <= 4) which = US"quota";
ob->quota_value = (off_t)d;
q = ob->quota_filecount;
break;
case 1:
+ if (d >= 2.0*1024.0*1024.0*1024.0) which = US"quota_filecount";
ob->quota_filecount_value = (int)d;
q = ob->quota_warn_threshold;
break;
case 2:
+ if (d >= 2.0*1024.0*1024.0*1024.0 && sizeof(off_t) <= 4)
+ which = US"quota_warn_threshold";
ob->quota_warn_threshold_value = (off_t)d;
q = ob->mailbox_size_string;
default_value = -1.0;
break;
case 3:
+ if (d >= 2.0*1024.0*1024.0*1024.0 && sizeof(off_t) <= 4)
+ which = US"mailbox_size";;
ob->mailbox_size_value = (off_t)d;
q = ob->mailbox_filecount_string;
break;
case 4:
+ if (d >= 2.0*1024.0*1024.0*1024.0) which = US"mailbox_filecount";
ob->mailbox_filecount_value = (int)d;
break;
}
+
+ if (which != NULL)
+ {
+ *errmsg = string_sprintf("%s value %.10g is too large (overflow) in "
+ "%s transport", which, d, tblock->name);
+ return FAIL;
+ }
}
return OK;