dovecot-2.2: fts: Don't crash if search arg string expands to em...
dovecot at dovecot.org
dovecot at dovecot.org
Sat May 9 10:33:13 UTC 2015
details: http://hg.dovecot.org/dovecot-2.2/rev/162668a63045
changeset: 18577:162668a63045
user: Timo Sirainen <tss at iki.fi>
date: Sat May 09 13:30:41 2015 +0300
description:
fts: Don't crash if search arg string expands to empty token list.
diffstat:
src/plugins/fts/fts-search-args.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diffs (16 lines):
diff -r 3bcd04bf5635 -r 162668a63045 src/plugins/fts/fts-search-args.c
--- a/src/plugins/fts/fts-search-args.c Sat May 09 13:20:29 2015 +0300
+++ b/src/plugins/fts/fts-search-args.c Sat May 09 13:30:41 2015 +0300
@@ -128,6 +128,12 @@
token) < 0)
return -1;
}
+
+ if (and_arg->value.subargs == NULL) {
+ /* we couldn't parse any tokens from the input */
+ and_arg->type = SEARCH_ALL;
+ and_arg->match_not = !and_arg->match_not;
+ }
*argp = and_arg;
return 0;
}
More information about the dovecot-cvs
mailing list