Skip to content

Commit

Permalink
lib-smtp: server: MAIL command: Make sure conn->state.pending_mail_cm…
Browse files Browse the repository at this point in the history
…ds cannot decrement through zero.

Added assertion.
  • Loading branch information
stephanbosch committed Mar 4, 2018
1 parent 8f3829c commit e678a94
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib-smtp/smtp-server-cmd-mail.c
Expand Up @@ -35,6 +35,7 @@ static void cmd_mail_replied(struct smtp_server_cmd_ctx *cmd)
struct smtp_server_cmd_mail *data =
(struct smtp_server_cmd_mail *)command->data;

i_assert(conn->state.pending_mail_cmds > 0);
conn->state.pending_mail_cmds--;

i_assert(smtp_server_command_is_replied(command));
Expand Down

0 comments on commit e678a94

Please sign in to comment.