OpenSSL: track shutdown calls. Bug 2864
[exim.git] / src / src / transport.c
index 8b320ecc201f8c215e4dcbf8b4274986c286a6a9..d04ee40cd4e5a00c3c8b5ef2eb404529a49ffef6 100644 (file)
@@ -1972,6 +1972,7 @@ if (socket_fd != 0)
 
 DEBUG(D_exec) debug_print_argv(argv);
 exim_nullstd();                          /* Ensure std{out,err} exist */
+/* argv[0] should be untainted, from child_exec_exim() */
 execv(CS argv[0], (char *const *)argv);
 
 DEBUG(D_any) debug_printf("execv failed: %s\n", strerror(errno));
@@ -2076,7 +2077,7 @@ Returns:             TRUE if all went well; otherwise an error will be
 BOOL
 transport_set_up_command(const uschar ***argvptr, uschar *cmd,
   BOOL expand_arguments, int expand_failed, address_item *addr,
-  uschar *etext, uschar **errptr)
+  const uschar * etext, uschar ** errptr)
 {
 const uschar **argv;
 uschar *s, *ss;
@@ -2164,7 +2165,6 @@ if (expand_arguments)
 
   for (int i = 0; argv[i]; i++)
     {
-
     /* Handle special fudge for passing an address list */
 
     if (addr &&
@@ -2264,8 +2264,9 @@ if (expand_arguments)
         }
 
       /* address_pipe_argcount - 1
-       * because we are replacing $address_pipe in the argument list
-       * with the first thing it expands to */
+      because we are replacing $address_pipe in the argument list
+      with the first thing it expands to */
+
       if (argcount + address_pipe_argcount - 1 > max_args)
         {
         addr->transport_return = FAIL;
@@ -2295,7 +2296,7 @@ if (expand_arguments)
       [argv 0][argv 1][argv 2=pipeargv[0]][argv 3=pipeargv[1]][old argv 3][0] */
 
       for (int address_pipe_i = 0;
-           address_pipe_argv[address_pipe_i] != US 0;
+           address_pipe_argv[address_pipe_i];
            address_pipe_i++, argcount++)
         argv[i++] = address_pipe_argv[address_pipe_i];