dovecot-2.1: lib-storage: Fixed assert-crash when search query c...

dovecot at dovecot.org dovecot at dovecot.org
Thu Dec 8 07:36:49 EET 2011


details:   http://hg.dovecot.org/dovecot-2.1/rev/338c8d9abba5
changeset: 13823:338c8d9abba5
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Dec 08 07:36:39 2011 +0200
description:
lib-storage: Fixed assert-crash when search query contained ().

diffstat:

 src/lib-storage/mail-search-build.c |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (16 lines):

diff -r 9cf6bb5fe98d -r 338c8d9abba5 src/lib-storage/mail-search-build.c
--- a/src/lib-storage/mail-search-build.c	Thu Dec 08 07:23:25 2011 +0200
+++ b/src/lib-storage/mail-search-build.c	Thu Dec 08 07:36:39 2011 +0200
@@ -58,7 +58,11 @@
 	if (strcmp(key, MAIL_SEARCH_PARSER_KEY_LIST) == 0) {
 		if (mail_search_build_list(ctx, &sarg) < 0)
 			return -1;
-		i_assert(sarg->value.subargs != NULL);
+		if (sarg->value.subargs == NULL) {
+			ctx->_error = "No search parameters inside list";
+			return -1;
+		}
+
 		ctx->parent = old_parent;
 		*arg_r = sarg;
 		return 1;


More information about the dovecot-cvs mailing list