Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
int ret = 0;
const char *c = name;
const char *event_name_end = c + LTTNG_SYMBOL_NAME_LEN;
int ret = 0;
const char *c = name;
const char *event_name_end = c + LTTNG_SYMBOL_NAME_LEN;
+ bool null_terminated = false;
/*
* Make sure that unescaped wildcards are only used as the last
/*
* Make sure that unescaped wildcards are only used as the last
while (c < event_name_end) {
switch (*c) {
case '\0':
while (c < event_name_end) {
switch (*c) {
case '\0':
+ null_terminated = true;
goto end;
case '\\':
c++;
goto end;
case '\\':
c++;
+ if (!ret && !null_terminated) {
+ ret = LTTNG_ERR_INVALID_EVENT_NAME;
+ }