summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/src/smtp_out.c4
-rw-r--r--src/src/transports/smtp.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/src/smtp_out.c b/src/src/smtp_out.c
index 0fa4ccd48..b6ff51108 100644
--- a/src/src/smtp_out.c
+++ b/src/src/smtp_out.c
@@ -352,6 +352,10 @@ if (!string_vformat(big_buffer, big_buffer_size, CS format, ap))
va_end(ap);
count = Ustrlen(big_buffer);
+if (count > outblock->buffersize)
+ log_write(0, LOG_MAIN|LOG_PANIC_DIE, "overlong write_command in outgoing "
+ "SMTP");
+
if (count > outblock->buffersize - (outblock->ptr - outblock->buffer))
{
rc = outblock->cmd_count; /* flush resets */
diff --git a/src/src/transports/smtp.c b/src/src/transports/smtp.c
index 33c91a67a..40eebe8b6 100644
--- a/src/src/transports/smtp.c
+++ b/src/src/transports/smtp.c
@@ -1228,7 +1228,7 @@ uschar new_message_id[MESSAGE_ID_LENGTH + 1];
uschar *p;
uschar buffer[4096];
uschar inbuffer[4096];
-uschar outbuffer[1024];
+uschar outbuffer[4096];
suppress_tls = suppress_tls; /* stop compiler warning when no TLS support */