mirror of
git://github.com/lxc/lxc
synced 2025-09-01 05:33:07 +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)
|
if (lxc_monitor_read(fd, &msg) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
msg.name[sizeof(msg.name)-1] = '\0';
|
||||||
if (regexec(&preg, msg.name, 0, NULL, 0))
|
if (regexec(&preg, msg.name, 0, NULL, 0))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user