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));
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;
for (int i = 0; argv[i]; i++)
{
-
/* Handle special fudge for passing an address list */
if (addr &&
}
/* 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;
[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];