dovecot-2.0: lib-auth: Crashfix if server sent broken input.

dovecot at dovecot.org dovecot at dovecot.org
Wed May 19 10:57:07 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/1753fe048fee
changeset: 11320:1753fe048fee
user:      Timo Sirainen <tss at iki.fi>
date:      Wed May 19 09:52:36 2010 +0200
description:
lib-auth: Crashfix if server sent broken input.

diffstat:

 src/lib-auth/auth-server-connection.c |  4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diffs (14 lines):

diff -r fb6bc399f5c3 -r 1753fe048fee src/lib-auth/auth-server-connection.c
--- a/src/lib-auth/auth-server-connection.c	Wed May 19 09:32:05 2010 +0200
+++ b/src/lib-auth/auth-server-connection.c	Wed May 19 09:52:36 2010 +0200
@@ -206,6 +206,10 @@
 		i_debug("auth input: %s", line);
 
 	args = t_strsplit(line, "\t");
+	if (args[0] == NULL) {
+		i_error("Auth server sent empty line");
+		return -1;
+	}
 	if (strcmp(args[0], "OK") == 0)
 		return auth_server_input_ok(conn, args + 1);
 	else if (strcmp(args[0], "CONT") == 0)


More information about the dovecot-cvs mailing list