Skip to content

Commit

Permalink
submission-login: Fix NULL dereference occurring at an invalid reply …
Browse files Browse the repository at this point in the history
…from the backend server.

Problem found by Coverity.
  • Loading branch information
stephanbosch committed Dec 12, 2017
1 parent 836ed7e commit 4a1af46
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/submission-login/submission-proxy.c
Expand Up @@ -233,6 +233,8 @@ int submission_proxy_parse_line(struct client *client, const char *line)
str_parse_uint(line, &status, &text) < 0 ||
status < 200 || status >= 560) {
invalid_line = TRUE;
} else {
text++;
}
if (subm_client->proxy_reply_status != 0 &&
subm_client->proxy_reply_status != status) {
Expand All @@ -249,7 +251,6 @@ int submission_proxy_parse_line(struct client *client, const char *line)
} else {
subm_client->proxy_reply_status = status;
}
text++;

if ((subm_client->proxy_capability &
SMTP_CAPABILITY_ENHANCEDSTATUSCODES) != 0)
Expand Down

0 comments on commit 4a1af46

Please sign in to comment.