Skip to content
Snippets Groups Projects
Commit 37e8f71c authored by Stephan Bosch's avatar Stephan Bosch
Browse files

managesieve: Fix missing-command check

Mirrors imap fix in Dovecot: 42149f48624b82fdf9631c256497580154c2e412

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.

Problem now found by GCC 7.
parent 15f9fd11
No related branches found
No related tags found
No related merge requests found
...@@ -605,7 +605,7 @@ static bool client_handle_input(struct client_command_context *cmd) ...@@ -605,7 +605,7 @@ static bool client_handle_input(struct client_command_context *cmd)
managesieve_refresh_proctitle(); managesieve_refresh_proctitle();
} }
if (cmd->name == '\0') { if (cmd->name[0] == '\0') {
/* command not given - cmd_func is already NULL. */ /* command not given - cmd_func is already NULL. */
} else { } else {
/* find the command function */ /* find the command function */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.