]> git.netwichtig.de Git - user/henk/code/exim.git/blobdiff - src/src/receive.c
Fix segfault on bad cmdline -f (sender) argument. Bug 2541
[user/henk/code/exim.git] / src / src / receive.c
index 6d20a5cdae255ee68582545a7c3db1f974ec7203..2745df6d1be723d671b63d1798f3a86e0f5a0b39 100644 (file)
@@ -645,6 +645,11 @@ if (!f.dot_ends)
   {
   int last_ch = '\n';
 
+/*XXX we do a gettimeofday before checking for every received char,
+which is hardly clever.  The function-indirection doesn't help, but
+an additional function to check for nonempty read buffer would help.
+See stdin_getc() / smtp_getc() / tls_getc() / bdat_getc(). */
+
   for ( ;
        log_close_chk(), (ch = (receive_getc)(GETC_BUFFER_UNLIMITED)) != EOF;
        last_ch = ch)
@@ -1399,7 +1404,6 @@ for (header_line * my_headerlist = header_list; my_headerlist;
     goto DO_MIME_ACL;
     }
 
-mime_part_count = -1;
 DEBUG(D_receive) debug_printf("No Content-Type: header - presumably not a MIME message.\n");
 return TRUE;
 
@@ -2564,7 +2568,7 @@ if (extract_recip)
 
         If there are no recipients at all, an error will occur later. */
 
-        if (recipient == NULL && Ustrcmp(errmess, "empty address") != 0)
+        if (!recipient && Ustrcmp(errmess, "empty address") != 0)
           {
           int len = Ustrlen(s);
           error_block *b = store_get(sizeof(error_block), FALSE);