mirror of
git://github.com/lxc/lxc
synced 2025-08-31 15:19:26 +00:00
lxc_monitor: make sure msg.name is null terminated (bug found by coverity)
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
@@ -97,6 +97,7 @@ int main(int argc, char *argv[])
|
||||
if (lxc_monitor_read(fd, &msg) < 0)
|
||||
return -1;
|
||||
|
||||
msg.name[sizeof(msg.name)-1] = '\0';
|
||||
if (regexec(&preg, msg.name, 0, NULL, 0))
|
||||
continue;
|
||||
|
||||
|
Reference in New Issue
Block a user