]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-auth: Crashfix if server sent broken input.
authorTimo Sirainen <tss@iki.fi>
Wed, 19 May 2010 07:52:36 +0000 (09:52 +0200)
committerTimo Sirainen <tss@iki.fi>
Wed, 19 May 2010 07:52:36 +0000 (09:52 +0200)
--HG--
branch : HEAD

src/lib-auth/auth-server-connection.c

index 0b2b8b58766c8fbf853b09a7426fe9df4a93ddbd..882e62e856c52a99a16bb70f96d1a068775f5033 100644 (file)
@@ -206,6 +206,10 @@ auth_server_connection_input_line(struct auth_server_connection *conn,
                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)