[dovecot-cvs] dovecot/src/imap imap-fetch.c,1.23,1.24

cras at dovecot.org cras at dovecot.org
Sat Aug 28 12:17:44 EEST 2004


Update of /home/cvs/dovecot/src/imap
In directory talvi:/tmp/cvs-serv20088

Modified Files:
	imap-fetch.c 
Log Message:
Don't crash with unknown FETCH commands.



Index: imap-fetch.c
===================================================================
RCS file: /home/cvs/dovecot/src/imap/imap-fetch.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- imap-fetch.c	23 Aug 2004 14:48:29 -0000	1.23
+++ imap-fetch.c	28 Aug 2004 09:17:42 -0000	1.24
@@ -67,8 +67,11 @@
 			  sizeof(struct imap_fetch_handler),
                           sizeof(struct imap_fetch_handler),
 			  imap_fetch_handler_bsearch);
-	if (handler == NULL)
-		i_panic("Called unknown handler: %s", arg);
+	if (handler == NULL) {
+		client_send_command_error(ctx->client,
+			t_strconcat("Unknown command ", arg, NULL));
+		return FALSE;
+	}
 
 	return handler->init(ctx, arg);
 }



More information about the dovecot-cvs mailing list