The original code cannot convert "" in filter expression to
a token correctly. The following command line exposes the
bug this change fixes:
# ./lsfd -o+ENDPOINTS -Q '(TYPE == "")'
zsh: IOT instruction sudo ./lsfd -Q '(TYPE == "")'
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
return;
}
escape = false;
- } else if (c == delimiter)
+ } else if (c == delimiter) {
+ if (token->val.str == NULL)
+ token->val.str = xstrdup("");
return;
- else if (c == '\\')
+ } else if (c == '\\')
escape = true;
else
xstrputc(&token->val.str, c);