From 1a907b3f153513d8b8343918320c2fc3b91b1863 Mon Sep 17 00:00:00 2001 From: Julien Thomas Date: Mon, 27 Nov 2017 05:04:40 +0100 Subject: [PATCH] parser/rfc5424-date: allow to terminate on any non-alnum character Terminating on a space was too restrictive. The patch allow the match to terminate on any non-alnum character, thus allowing space, tab, comma, ... --- src/parser.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/parser.c b/src/parser.c index 1352f20c..48a30284 100644 --- a/src/parser.c +++ b/src/parser.c @@ -404,7 +404,9 @@ PARSER_Parse(RFC5424Date) } if(len > 0) { - if(*pszTS != ' ') /* if it is not a space, it can not be a "good" time */ + /* if it is alpha or number, it can not be a "good" time + * a successful match terminates on space, tab, comma, ... */ + if(isalnum(*pszTS)) goto done; }