dovecot: Don't crash if convert_alt_hierarchy_char isn't set.

dovecot at dovecot.org dovecot at dovecot.org
Sat Nov 3 18:40:44 EET 2007


details:   http://hg.dovecot.org/dovecot/rev/baf570ca608b
changeset: 6672:baf570ca608b
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Nov 03 18:40:40 2007 +0200
description:
Don't crash if convert_alt_hierarchy_char isn't set.

diffstat:

1 file changed, 1 insertion(+), 1 deletion(-)
src/plugins/convert/convert-plugin.c |    2 +-

diffs (12 lines):

diff -r 2a49ba9789b1 -r baf570ca608b src/plugins/convert/convert-plugin.c
--- a/src/plugins/convert/convert-plugin.c	Sat Nov 03 17:57:46 2007 +0200
+++ b/src/plugins/convert/convert-plugin.c	Sat Nov 03 18:40:40 2007 +0200
@@ -33,7 +33,7 @@ void convert_plugin_init(void)
 	set.skip_dotdirs = getenv("CONVERT_SKIP_DOTDIRS") != NULL;
 
 	str = getenv("CONVERT_ALT_HIERARCHY_CHAR");
-	set.alt_hierarchy_char = *str != '\0' ? *str : '_';
+	set.alt_hierarchy_char = str != NULL && *str != '\0' ? *str : '_';
 
 	if (convert_storage(convert_mail, mail, &set) < 0)
 		exit(FATAL_DEFAULT);


More information about the dovecot-cvs mailing list