]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imap-zlib: Fixed crash if imap_zlib_compress_level setting wasn't set.
authorTimo Sirainen <tss@iki.fi>
Sat, 10 Apr 2010 04:28:58 +0000 (07:28 +0300)
committerTimo Sirainen <tss@iki.fi>
Sat, 10 Apr 2010 04:28:58 +0000 (07:28 +0300)
--HG--
branch : HEAD

src/plugins/imap-zlib/imap-zlib-plugin.c

index 864274c8c2f1f5c50e8b4125522b8b4e10ef0258..74a60d1269865a2c6c9642f7929272d76871ad42 100644 (file)
@@ -104,7 +104,7 @@ static bool cmd_compress(struct client_command_context *cmd)
 
        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;