dovecot-2.2: lib-fts: Added assert to fts_filter_filter() to mak...

dovecot at dovecot.org dovecot at dovecot.org
Mon May 11 13:03:09 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/cc59ac0f6a45
changeset: 18635:cc59ac0f6a45
user:      Timo Sirainen <tss at iki.fi>
date:      Mon May 11 16:00:21 2015 +0300
description:
lib-fts: Added assert to fts_filter_filter() to make sure input token isn't empty

diffstat:

 src/lib-fts/fts-filter.c |  2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diffs (12 lines):

diff -r aa3374b9ce0f -r cc59ac0f6a45 src/lib-fts/fts-filter.c
--- a/src/lib-fts/fts-filter.c	Mon May 11 14:42:18 2015 +0300
+++ b/src/lib-fts/fts-filter.c	Mon May 11 16:00:21 2015 +0300
@@ -95,6 +95,8 @@
 {
 	int ret = 0;
 
+	i_assert((*token)[0] != '\0');
+
 	/* Recurse to parent. */
 	if (filter->parent != NULL)
 		ret = fts_filter_filter(filter->parent, token, error_r);


More information about the dovecot-cvs mailing list