projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix all strncpy() usage: need to set a final \0 character at the end
[lttng-tools.git]
/
ltt-sessiond
/
kernel-ctl.c
diff --git
a/ltt-sessiond/kernel-ctl.c
b/ltt-sessiond/kernel-ctl.c
index 407dd580448c18d61cd0c9a2a168589fc6fb5a14..419d1af7b3fa1b129689ce89fd2e0cc6ee3e5078 100644
(file)
--- a/
ltt-sessiond/kernel-ctl.c
+++ b/
ltt-sessiond/kernel-ctl.c
@@
-609,7
+609,8
@@
ssize_t kernel_list_events(int tracer_fd, struct lttng_event **events)
goto error;
}
}
goto error;
}
}
- strncpy(elist[count].name, event, strlen(event));
+ strncpy(elist[count].name, event, LTTNG_SYMBOL_NAME_LEN);
+ elist[count].name[LTTNG_SYMBOL_NAME_LEN - 1] = '\0';
count++;
}
count++;
}
This page took
0.023742 seconds
and
4
git commands to generate.