summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2015-02-26 19:58:13 +0000
committerJeremy Harris <jgh146exb@wizmail.org>2015-02-26 19:58:13 +0000
commitb980ed83fa4ae95ee650ccf73d33dbad4c20c595 (patch)
tree0b3cdf5c11f10618d8f14828b4daebbbdc7aee7c /src
parent1708162e6ba66736dc0bb03b2d66b0201f970571 (diff)
Increase limit on SMTP confirmation message copy size. Bug 1572
Diffstat (limited to 'src')
-rw-r--r--src/src/deliver.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/src/deliver.c b/src/src/deliver.c
index ec13ca40b..ad871c575 100644
--- a/src/src/deliver.c
+++ b/src/src/deliver.c
@@ -911,11 +911,12 @@ if (log_extra_selector & LX_smtp_confirmation &&
addr->message &&
(addr->host_used || Ustrcmp(addr->transport->driver_name, "lmtp") == 0))
{
- int i;
+ unsigned i;
+ unsigned lim = MIN(big_buffer_size, 1024);
uschar *p = big_buffer;
uschar *ss = addr->message;
*p++ = '\"';
- for (i = 0; i < 256 && ss[i] != 0; i++) /* limit logged amount */
+ for (i = 0; i < lim && ss[i] != 0; i++) /* limit logged amount */
{
if (ss[i] == '\"' || ss[i] == '\\') *p++ = '\\'; /* quote \ and " */
*p++ = ss[i];