From: Serge Hallyn Date: Mon, 15 Apr 2013 02:39:34 +0000 (-0500) Subject: lxc_monitor: make sure msg.name is null terminated (bug found by coverity) X-Git-Tag: lxc-1.0.0.alpha1~1^2~308 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4e4ca49c792d7320787a6991ce1815d26060d39;p=thirdparty%2Flxc.git lxc_monitor: make sure msg.name is null terminated (bug found by coverity) Signed-off-by: Serge Hallyn --- diff --git a/src/lxc/lxc_monitor.c b/src/lxc/lxc_monitor.c index 053037390..8c158698e 100644 --- a/src/lxc/lxc_monitor.c +++ b/src/lxc/lxc_monitor.c @@ -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;