mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-15 06:06:57 +00:00
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:
parent
2957be64da
commit
0044aab02a
@ -129,6 +129,7 @@ static bool set_argv(struct lxc_container *c, struct lxc_arguments *args)
|
|||||||
char buf[MAXPATHLEN];
|
char buf[MAXPATHLEN];
|
||||||
char **components, **p;
|
char **components, **p;
|
||||||
|
|
||||||
|
buf[0] = '\0';
|
||||||
ret = c->get_config_item(c, "lxc.execute.cmd", buf, MAXPATHLEN);
|
ret = c->get_config_item(c, "lxc.execute.cmd", buf, MAXPATHLEN);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user