Unverified Commit 15dbf0a0 by Tycho Andersen Committed by Christian Brauner

execute: account for -o path option count

This always works fine... until your exec() fails and you try to go and free it, you've overwritten the allocator's metadata (and potentially other stuff) and it fails. Signed-off-by: 's avatarTycho Andersen <tycho@tycho.ws>
parent 37b143df
......@@ -64,6 +64,9 @@ static int execute_start(struct lxc_handler *handler, void* data)
if (lxc_log_has_valid_level())
argc_add += 2;
if (current_config->logfd != -1 || lxc_log_fd != -1)
argc_add += 2;
argv = malloc((argc + argc_add) * sizeof(*argv));
if (!argv)
goto out1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment