dovecot-2.0: imap-zlib: Fixed crash if imap_zlib_compress_level ...

dovecot at dovecot.org dovecot at dovecot.org
Sat Apr 10 07:29:03 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/454ea8812d54
changeset: 11124:454ea8812d54
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Apr 10 07:28:58 2010 +0300
description:
imap-zlib: Fixed crash if imap_zlib_compress_level setting wasn't set.

diffstat:

 src/plugins/imap-zlib/imap-zlib-plugin.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r cc00fdf1943b -r 454ea8812d54 src/plugins/imap-zlib/imap-zlib-plugin.c
--- a/src/plugins/imap-zlib/imap-zlib-plugin.c	Sat Apr 10 07:25:19 2010 +0300
+++ b/src/plugins/imap-zlib/imap-zlib-plugin.c	Sat Apr 10 07:28:58 2010 +0300
@@ -104,7 +104,7 @@
 
 	value = mail_user_plugin_getenv(client->user,
 					"imap_zlib_compress_level");
-	if (str_to_uint(value, &level) < 0 ||
+	if (value == NULL || str_to_uint(value, &level) < 0 ||
 	    level <= 0 || level > 9)
 		level = IMAP_COMPRESS_DEFAULT_LEVEL;
 


More information about the dovecot-cvs mailing list