Unverified Commit 7ccdf146 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 7977dda5
......@@ -57,6 +57,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) {
SYSERROR("Allocating init args failed");
......
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