On Mon, 07 Jan 2013, Austin Clements <[email protected]> wrote:
> Xapian doesn't consider ":abc" to be a prefixed term.  This makes
> parse_boolean_term similarly reject queries with an empty prefix.

LGTM,
Jani.

> ---
>  util/string-util.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/util/string-util.c b/util/string-util.c
> index aba9aa8..a5622d7 100644
> --- a/util/string-util.c
> +++ b/util/string-util.c
> @@ -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) {
> -- 
> 1.7.10.4
_______________________________________________
notmuch mailing list
[email protected]
http://notmuchmail.org/mailman/listinfo/notmuch

Reply via email to