From: Mathieu Desnoyers Date: Fri, 25 Nov 2011 11:12:14 +0000 (+0100) Subject: lttng disable_events: ensure end of string is set to \0 X-Git-Tag: v2.0-pre15~71 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=422138c82c89f4c8863776b0a5737dfd47044ff3;p=lttng-tools.git lttng disable_events: ensure end of string is set to \0 Signed-off-by: Mathieu Desnoyers --- diff --git a/lttng/commands/disable_events.c b/lttng/commands/disable_events.c index 1891cd2e3..67af683c8 100644 --- a/lttng/commands/disable_events.c +++ b/lttng/commands/disable_events.c @@ -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;