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 access to pids array
[lttng-tools.git]
/
src
/
lib
/
lttng-ctl
/
lttng-ctl.c
diff --git
a/src/lib/lttng-ctl/lttng-ctl.c
b/src/lib/lttng-ctl/lttng-ctl.c
index c8d60cddcaee5e5bd9e2323c680c5dc710104cfc..d8e2f1428df7fc27560b532c5b3c41ca478c60f8 100644
(file)
--- a/
src/lib/lttng-ctl/lttng-ctl.c
+++ b/
src/lib/lttng-ctl/lttng-ctl.c
@@
-2744,6
+2744,9
@@
int lttng_list_tracker_pids(struct lttng_handle *handle,
return ret;
}
nr_pids = ret / sizeof(int32_t);
+ if (nr_pids > 0 && !pids) {
+ return -LTTNG_ERR_UNK;
+ }
if (nr_pids == 1 && pids[0] == -1) {
free(pids);
pids = NULL;
This page took
0.023808 seconds
and
4
git commands to generate.