dovecot-2.2: imap: Don't crash in IDLE if remote IP isn't known ...

dovecot at dovecot.org dovecot at dovecot.org
Tue Dec 4 13:05:05 EET 2012


details:   http://hg.dovecot.org/dovecot-2.2/rev/266e24f1c78c
changeset: 15452:266e24f1c78c
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Dec 04 13:04:59 2012 +0200
description:
imap: Don't crash in IDLE if remote IP isn't known (PREAUTH)

diffstat:

 src/imap/cmd-idle.c |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (13 lines):

diff -r 9c1791d1834f -r 266e24f1c78c src/imap/cmd-idle.c
--- a/src/imap/cmd-idle.c	Tue Dec 04 13:02:22 2012 +0200
+++ b/src/imap/cmd-idle.c	Tue Dec 04 13:04:59 2012 +0200
@@ -212,7 +212,8 @@
 	   time, but this can be avoided by using a properly configured Dovecot
 	   proxy. we'll also try to avoid this by not doing it for the commonly
 	   used intranet IP ranges. */
-	client_hash = remote_ip_is_usable(ctx->client->user->remote_ip) ?
+	client_hash = ctx->client->user->remote_ip != NULL &&
+		remote_ip_is_usable(ctx->client->user->remote_ip) ?
 		net_ip_hash(ctx->client->user->remote_ip) :
 		crc32_str(ctx->client->user->username);
 	interval -= (time(NULL) + client_hash) % interval;


More information about the dovecot-cvs mailing list