Skip to content

Commit

Permalink
parser/rfc5424-date: allow to terminate on any non-alnum character
Browse files Browse the repository at this point in the history
Terminating on a space was too restrictive. The patch allow the
match to terminate on any non-alnum character, thus allowing space,
tab, comma, ...
  • Loading branch information
julthomas committed Feb 1, 2018
1 parent d4136cd commit 1a907b3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 1a907b3

Please sign in to comment.