I sent wrong path before :-/
Signed-off-by: Nikola Pajkovsky npajkovs@redhat.com --- src/lib/event_config.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/lib/event_config.c b/src/lib/event_config.c index 7a8b5e3..6b8a288 100644 --- a/src/lib/event_config.c +++ b/src/lib/event_config.c @@ -304,10 +304,13 @@ static char *validate_event_option(event_option_t *opt) break; case OPTION_TYPE_NUMBER: { - long r = strtol(opt->value, (char **)&s, 10); + char *endptr; + errno = 0; + long r = strtol(opt->value, &endptr, 10); (void) r; - if (*s || errno) + if (errno != 0 || endptr == opt->value || *endptr != '\0') return xasprintf(_("Invalid number '%s'"), opt->value); + break; } case OPTION_TYPE_BOOL: