From: David Goulet Date: Thu, 28 Jul 2011 16:13:02 +0000 (-0400) Subject: Fix bad strncmp length X-Git-Tag: v2.0-pre5~4 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=1b110e1bb85042be8b94d7eb81d9dfe8b561a304;p=lttng-tools.git Fix bad strncmp length Signed-off-by: David Goulet --- diff --git a/ltt-sessiond/session.c b/ltt-sessiond/session.c index 7a7bf3e57..3131006f1 100644 --- a/ltt-sessiond/session.c +++ b/ltt-sessiond/session.c @@ -132,7 +132,7 @@ struct ltt_session *find_session_by_name(char *name) lock_session_list(); cds_list_for_each_entry(iter, <t_session_list.head, list) { - if (strncmp(iter->name, name, strlen(name)) == 0) { + if (strncmp(iter->name, name, NAME_MAX) == 0) { found = 1; break; }