[dovecot-cvs]
dovecot/src/imap-login client-authenticate.c, 1.39.2.2, 1.39.2.3
cras at dovecot.org
cras at dovecot.org
Sat Jun 17 22:48:37 EEST 2006
Update of /var/lib/cvs/dovecot/src/imap-login
In directory talvi:/tmp/cvs-serv26909
Modified Files:
Tag: branch_1_0
client-authenticate.c
Log Message:
Don't crash if the initial response isn't given for AUTHENTICATE..
Index: client-authenticate.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap-login/client-authenticate.c,v
retrieving revision 1.39.2.2
retrieving revision 1.39.2.3
diff -u -d -r1.39.2.2 -r1.39.2.3
--- client-authenticate.c 17 Jun 2006 17:19:29 -0000 1.39.2.2
+++ client-authenticate.c 17 Jun 2006 19:48:35 -0000 1.39.2.3
@@ -233,7 +233,7 @@
int cmd_authenticate(struct imap_client *client, struct imap_arg *args)
{
- const char *mech_name;
+ const char *mech_name, *init_resp = NULL;
/* we want only one argument: authentication mechanism name */
if (args[0].type != IMAP_ARG_ATOM && args[0].type != IMAP_ARG_STRING)
@@ -243,6 +243,7 @@
if (args[1].type != IMAP_ARG_ATOM ||
args[2].type != IMAP_ARG_EOL)
return -1;
+ init_resp = IMAP_ARG_STR(&args[1]);
}
mech_name = IMAP_ARG_STR(&args[0]);
@@ -251,7 +252,7 @@
client_ref(client);
sasl_server_auth_begin(&client->common, "IMAP", mech_name,
- IMAP_ARG_STR(&args[1]), sasl_callback);
+ init_resp, sasl_callback);
if (!client->common.authenticating)
return 1;
More information about the dovecot-cvs
mailing list