[lxc-devel] [lxc/master] tools: fix lxc-execute command parsing
brauner on Github
lxc-bot at linuxcontainers.org
Sat Aug 18 09:58:19 UTC 2018
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 421 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20180818/ca8d8b4b/attachment.bin>
-------------- next part --------------
From 0044aab02aca5bb358eee719d00a48384aa590b9 Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brauner at ubuntu.com>
Date: Sat, 18 Aug 2018 11:56:05 +0200
Subject: [PATCH] tools: fix lxc-execute command parsing
Initialize buf to avoid parsing random data later on.
Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>
---
src/lxc/tools/lxc_execute.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/lxc/tools/lxc_execute.c b/src/lxc/tools/lxc_execute.c
index 32911b7fc..8e69f7244 100644
--- a/src/lxc/tools/lxc_execute.c
+++ b/src/lxc/tools/lxc_execute.c
@@ -129,6 +129,7 @@ static bool set_argv(struct lxc_container *c, struct lxc_arguments *args)
char buf[MAXPATHLEN];
char **components, **p;
+ buf[0] = '\0';
ret = c->get_config_item(c, "lxc.execute.cmd", buf, MAXPATHLEN);
if (ret < 0)
return false;
More information about the lxc-devel
mailing list