]> git.netwichtig.de Git - user/henk/code/exim.git/blobdiff - src/src/smtp_in.c
Ensure $smtp_command is initialized before it can be expanded (bug 1182).
[user/henk/code/exim.git] / src / src / smtp_in.c
index e79f0a202e233c010aaa25e11ab600f3edd0e66b..23bc5315e8f22978a6809c46bdd113d8af0cc0d8 100644 (file)
@@ -983,7 +983,8 @@ if (*v != '=') return FALSE;
 n = v;
 while(isalpha(n[-1])) n--;
 
-if (n[-1] != ' ') return FALSE;
+/* RFC says SP, but TAB seen in wild and other major MTAs accept it */
+if (!isspace(n[-1])) return FALSE;
 
 n[-1] = 0;
 *name = n;
@@ -1395,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