mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-22 09:24:54 +01:00
string-util: Disallow empty prefixes in parse_boolean_term
Xapian doesn't consider ":abc" to be a prefixed term. This makes parse_boolean_term similarly reject queries with an empty prefix.
This commit is contained in:
parent
bd829fde96
commit
b4b22d3714
1 changed files with 1 additions and 1 deletions
|
@ -127,7 +127,7 @@ parse_boolean_term (void *ctx, const char *str,
|
|||
/* Parse prefix */
|
||||
str = skip_space (str);
|
||||
const char *pos = strchr (str, ':');
|
||||
if (! pos)
|
||||
if (! pos || pos == str)
|
||||
goto FAIL;
|
||||
*prefix_out = talloc_strndup (ctx, str, pos - str);
|
||||
if (! *prefix_out) {
|
||||
|
|
Loading…
Reference in a new issue