X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Factions%2Fpath.c;fp=src%2Fcommon%2Factions%2Fpath.c;h=4ee649928f646cee1de22306f71e690fc1bac9fa;hp=7f4955475aa9775f9001e9a34aebca0e5b864874;hb=7afaf43b5246ca6495c3e97695e373704f0fd2db;hpb=76ff85cc12ced2d3adb1de8baa569902900953f5 diff --git a/src/common/actions/path.c b/src/common/actions/path.c index 7f4955475..4ee649928 100644 --- a/src/common/actions/path.c +++ b/src/common/actions/path.c @@ -143,6 +143,13 @@ ssize_t lttng_action_path_create_from_payload( header = (typeof(header)) header_view.buffer.data; consumed_size += header_view.buffer.size; + + /* + * An action path of size 0 can exist and represents a trigger with a + * single non-list action. Handle it differently since a payload view of + * size 0 is considered invalid. + */ + if (header->index_count != 0) { const struct lttng_payload_view indexes_view = lttng_payload_view_from_view(view, @@ -161,6 +168,11 @@ ssize_t lttng_action_path_create_from_payload( if (!action_path) { goto end; } + } else { + action_path = lttng_action_path_create(NULL, 0); + if (!action_path) { + goto end; + } } ret = consumed_size;