tools: fix lxc-execute command parsing

Initialize buf to avoid parsing random data later on.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
Christian Brauner 2018-08-18 11:56:05 +02:00
parent 2957be64da
commit 0044aab02a
No known key found for this signature in database
GPG Key ID: 8EB056D53EECB12D

View File

@ -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;