Mercurial > dovecot > core-2.2
changeset 21515:d2a22c25b8b4
fts: Fix crash using fts_autoexpunge_exclude = \Special-use crash
It crashed whenever seeing a mailbox that didn't have any special-use flags.
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Fri, 10 Feb 2017 12:50:58 +0200 |
parents | 83481546a656 |
children | d1772c456530 |
files | src/plugins/fts/fts-storage.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/plugins/fts/fts-storage.c Fri Feb 10 12:46:50 2017 +0200 +++ b/src/plugins/fts/fts-storage.c Fri Feb 10 12:50:58 2017 +0200 @@ -781,7 +781,8 @@ for (i = 0; exclude_list[i] != NULL; i++) { if (exclude_list[i][0] == '\\') { /* \Special-use flag */ - if (str_array_icase_find(special_use, exclude_list[i])) + if (special_use != NULL && + str_array_icase_find(special_use, exclude_list[i])) return TRUE; } else { /* mailbox name with wildcards */