[dovecot-cvs] dovecot/src/imap cmd-uid.c,1.9,1.10
tss at dovecot.org
tss at dovecot.org
Tue Feb 6 11:44:59 UTC 2007
Update of /var/lib/cvs/dovecot/src/imap
In directory talvi:/tmp/cvs-serv21723
Modified Files:
cmd-uid.c
Log Message:
Don't crash with unknown UID commands.
Index: cmd-uid.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/cmd-uid.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- cmd-uid.c 20 Dec 2006 20:47:02 -0000 1.9
+++ cmd-uid.c 6 Feb 2007 11:44:57 -0000 1.10
@@ -14,15 +14,14 @@
return FALSE;
command = command_find(t_strconcat("UID ", cmd_name, NULL));
- cmd->cmd_flags = command->flags;
- cmd->func = command->func;
-
- if (cmd->func != NULL) {
- cmd->uid = TRUE;
- return cmd->func(cmd);
- } else {
+ if (command == NULL) {
client_send_tagline(cmd, t_strconcat(
"BAD Unknown UID command ", cmd_name, NULL));
return TRUE;
}
+
+ cmd->cmd_flags = command->flags;
+ cmd->func = command->func;
+ cmd->uid = TRUE;
+ return cmd->func(cmd);
}
More information about the dovecot-cvs
mailing list