mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-30 21:05:59 +00:00
Ensure monitored container name is null terminated
regexec() expects a null terminated name. Signed-off-by: Michael Santos <michael.santos@gmail.com> Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
This commit is contained in:
parent
302aaa2b2d
commit
f3bc28bd61
@ -70,6 +70,7 @@ void lxc_monitor_send_state(const char *name, lxc_state_t state)
|
||||
struct lxc_msg msg = { .type = lxc_msg_state,
|
||||
.value = state };
|
||||
strncpy(msg.name, name, sizeof(msg.name));
|
||||
msg.name[sizeof(msg.name) - 1] = 0;
|
||||
|
||||
lxc_monitor_send(&msg);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user