lttng disable_events: ensure end of string is set to \0
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 25 Nov 2011 11:12:14 +0000 (12:12 +0100)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 25 Nov 2011 11:12:14 +0000 (12:12 +0100)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lttng/commands/disable_events.c

index 1891cd2e34729cc45b94ec3c2f4da12f8f9391dc..67af683c8817270ffa11b5307e2e4d358170c34f 100644 (file)
@@ -110,6 +110,7 @@ static int disable_events(char *session_name)
        } else if (opt_userspace && opt_cmd_name != NULL) {
                dom.type = LTTNG_DOMAIN_UST_EXEC_NAME;
                strncpy(dom.attr.exec_name, opt_cmd_name, NAME_MAX);
+               dom.attr.exec_name[NAME_MAX - 1] = '\0';
        } else {
                ERR("Please specify a tracer (--kernel or --userspace)");
                ret = CMD_NOT_IMPLEMENTED;
This page took 0.028629 seconds and 4 git commands to generate.