[dovecot-cvs] dovecot/src/imap client.c,1.77,1.78

tss at dovecot.org tss at dovecot.org
Tue Feb 6 18:52:52 UTC 2007


Update of /var/lib/cvs/dovecot/src/imap
In directory talvi:/tmp/cvs-serv3735

Modified Files:
	client.c 
Log Message:
Don't crash if client disconnects in the middle of sending a command line.



Index: client.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/client.c,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -d -r1.77 -r1.78
--- client.c	6 Feb 2007 18:50:52 -0000	1.77
+++ client.c	6 Feb 2007 18:52:49 -0000	1.78
@@ -61,7 +61,7 @@
 	bool cmd_ret;
 
 	cmd->cancel = TRUE;
-	cmd_ret = cmd->func(cmd);
+	cmd_ret = cmd->func == NULL ? TRUE : cmd->func(cmd);
 	if (!cmd_ret) {
 		if (cmd->client->output->closed)
 			i_panic("command didn't cancel itself: %s", cmd->name);



More information about the dovecot-cvs mailing list