projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: event-expr.c: use-after-free and NULL ptr deref in error path
[lttng-tools.git]
/
src
/
lib
/
lttng-ctl
/
channel.c
diff --git
a/src/lib/lttng-ctl/channel.c
b/src/lib/lttng-ctl/channel.c
index a4e910e1d93db1b02b35f75824ddfb7f714cf5a1..868e8aa68b7eb85b1dd6f206d1fb38511cfd05e0 100644
(file)
--- a/
src/lib/lttng-ctl/channel.c
+++ b/
src/lib/lttng-ctl/channel.c
@@
-164,9
+164,14
@@
struct lttng_notification_channel *lttng_notification_channel_create(
}
if (is_root || is_in_tracing_group) {
}
if (is_root || is_in_tracing_group) {
-
lttng_ctl_copy_string
(sock_path,
+
ret = lttng_strncpy
(sock_path,
DEFAULT_GLOBAL_NOTIFICATION_CHANNEL_UNIX_SOCK,
LTTNG_PATH_MAX);
DEFAULT_GLOBAL_NOTIFICATION_CHANNEL_UNIX_SOCK,
LTTNG_PATH_MAX);
+ if (ret) {
+ ret = -LTTNG_ERR_INVALID;
+ goto error;
+ }
+
ret = lttcomm_connect_unix_sock(sock_path);
if (ret >= 0) {
fd = ret;
ret = lttcomm_connect_unix_sock(sock_path);
if (ret >= 0) {
fd = ret;
This page took
0.024338 seconds
and
4
git commands to generate.