projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: unchecked return value in trace_clock_read64_monotonic
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
consumer.c
diff --git
a/src/bin/lttng-sessiond/consumer.c
b/src/bin/lttng-sessiond/consumer.c
index bd019dd31da15f6953b873899f12b4dd07770c9a..934af39bd3f6028b69138765b39c22401e6dbfbe 100644
(file)
--- a/
src/bin/lttng-sessiond/consumer.c
+++ b/
src/bin/lttng-sessiond/consumer.c
@@
-715,7
+715,10
@@
int consumer_set_network_uri(struct consumer_output *obj,
goto error;
}
goto error;
}
- strncpy(obj->subdir, tmp_path, sizeof(obj->subdir));
+ if (lttng_strncpy(obj->subdir, tmp_path, sizeof(obj->subdir))) {
+ ret = -LTTNG_ERR_INVALID;
+ goto error;
+ }
DBG3("Consumer set network uri subdir path %s", tmp_path);
}
DBG3("Consumer set network uri subdir path %s", tmp_path);
}
@@
-1086,7
+1089,11
@@
int consumer_set_subdir(struct consumer_output *consumer,
goto error;
}
goto error;
}
- strncpy(consumer->subdir, tmp_path, sizeof(consumer->subdir));
+ if (lttng_strncpy(consumer->subdir, tmp_path,
+ sizeof(consumer->subdir))) {
+ ret = -EINVAL;
+ goto error;
+ }
DBG2("Consumer subdir set to %s", consumer->subdir);
error:
DBG2("Consumer subdir set to %s", consumer->subdir);
error:
This page took
0.025763 seconds
and
4
git commands to generate.