Ensure $smtp_command is initialized before it can be expanded (bug 1182).
authorJeremy Harris <jgh146exb@wizmail.org>
Mon, 23 Apr 2012 22:57:47 +0000 (23:57 +0100)
committerJeremy Harris <jgh146exb@wizmail.org>
Mon, 23 Apr 2012 22:57:47 +0000 (23:57 +0100)
src/src/smtp_in.c

index 476bbf0..23bc531 100644 (file)
@@ -1396,6 +1396,7 @@ smtp_cmd_buffer = (uschar *)malloc(2*smtp_cmd_buffer_size + 2);
 if (smtp_cmd_buffer == NULL)
   log_write(0, LOG_MAIN|LOG_PANIC_DIE,
     "malloc() failed for SMTP command buffer");
+smtp_cmd_buffer[0] = 0;
 smtp_data_buffer = smtp_cmd_buffer + smtp_cmd_buffer_size + 1;
 
 /* For batched input, the protocol setting can be overridden from the