mirror of
https://github.com/zeek/zeek.git
synced 2025-10-17 14:08:20 +00:00
Fix config reader regular expression for MUSL.
It was not dealing with multiple spaces between the key and the value with MUSL correctly. This change ensures that if a value exists, that it begins and ends with a non-blank character.
This commit is contained in:
parent
dbd8a4fc9f
commit
7f4914c219
3 changed files with 3 additions and 1 deletions
|
@ -182,7 +182,7 @@ bool Config::DoUpdate()
|
|||
}
|
||||
|
||||
regex_t re;
|
||||
if ( regcomp(&re, "^([^[:blank:]]+)[[:blank:]]+(.*[^[:blank:]])?[[:blank:]]*$", REG_EXTENDED) )
|
||||
if ( regcomp(&re, "^([^[:blank:]]+)[[:blank:]]+([^[:blank:]](.*[^[:blank:]])?)?[[:blank:]]*$", REG_EXTENDED) )
|
||||
{
|
||||
Error(Fmt("Failed to compile regex."));
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue