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:
Serge Hallyn 2013-04-14 21:39:34 -05:00
parent c928f41fc0
commit b4e4ca49c7

View File

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