dovecot-2.2: imap: fix missing-command check
dovecot at dovecot.org
dovecot at dovecot.org
Tue May 27 18:19:15 UTC 2014
details: http://hg.dovecot.org/dovecot-2.2/rev/9f1e53489674
changeset: 17405:9f1e53489674
user: Phil Carmody <phil at dovecot.fi>
date: Tue May 27 21:17:34 2014 +0300
description:
imap: fix missing-command check
It's impossible for the command's pointer to be NULL at this point.
Previously, the command_find() would have returned NULL, but this check
presumably short-circuits that search in the trivial case, so has some
real use.
Signed-off-by: Phil Carmody <phil at dovecot.fi>
diffstat:
src/imap/imap-client.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (14 lines):
diff -r b37e71093468 -r 9f1e53489674 src/imap/imap-client.c
--- a/src/imap/imap-client.c Tue May 27 21:17:34 2014 +0300
+++ b/src/imap/imap-client.c Tue May 27 21:17:34 2014 +0300
@@ -813,8 +813,8 @@
client->input_skip_line = TRUE;
- if (cmd->name == '\0') {
- /* command not given - cmd_func is already NULL. */
+ if (cmd->name[0] == '\0') {
+ /* command not given - cmd->func is already NULL. */
} else if ((command = command_find(cmd->name)) != NULL) {
cmd->func = command->func;
cmd->cmd_flags = command->flags;
More information about the dovecot-cvs
mailing list