[dovecot-cvs] dovecot/src/pop3-login client-authenticate.c, 1.46,
1.47 client.c, 1.47, 1.48
cras at dovecot.org
cras at dovecot.org
Sat Jan 28 23:47:03 EET 2006
Update of /var/lib/cvs/dovecot/src/pop3-login
In directory talvi:/tmp/cvs-serv21074/pop3-login
Modified Files:
client-authenticate.c client.c
Log Message:
If client disconnected while we were trying to send authentication
continuation to it, we crashed.
Index: client-authenticate.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/pop3-login/client-authenticate.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- client-authenticate.c 14 Jan 2006 18:48:17 -0000 1.46
+++ client-authenticate.c 28 Jan 2006 21:47:00 -0000 1.47
@@ -188,16 +188,10 @@
iov[2].iov_base = "\r\n";
iov[2].iov_len = 2;
- ret = o_stream_sendv(client->output, iov, 3);
- if (ret < 0)
- client_destroy(client, "Disconnected");
- else if ((size_t)ret != 2 + data_len + 2)
- client_destroy(client, "Transmit buffer full");
- else {
- /* continue */
- return;
- }
- break;
+ /* don't check return value here. it gets tricky if we try
+ to call client_destroy() in here. */
+ (void)o_stream_sendv(client->output, iov, 3);
+ return;
}
client_unref(client);
Index: client.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/pop3-login/client.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- client.c 28 Jan 2006 21:28:16 -0000 1.47
+++ client.c 28 Jan 2006 21:47:00 -0000 1.48
@@ -406,6 +406,7 @@
bool client_unref(struct pop3_client *client)
{
+ i_assert(client->refcount > 0);
if (--client->refcount > 0)
return TRUE;
More information about the dovecot-cvs
mailing list