Skip to content

Commit

Permalink
Merge pull request #5209 from brong/backend-nobogus
Browse files Browse the repository at this point in the history
backend: don't even try to connect if port == "0"
  • Loading branch information
brong authored Jan 15, 2025
2 parents 75bb809 + 9fb4709 commit ad34908
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions imap/backend.c
Original file line number Diff line number Diff line change
Expand Up @@ -1057,6 +1057,9 @@ EXPORTED struct backend *backend_connect(struct backend *ret_backend, const char
}
}

// don't do lookups if the port number is zero
if (!strcmp(service, "0")) goto error;

memset(&hints, 0, sizeof(hints));
hints.ai_family = PF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
Expand Down

0 comments on commit ad34908

Please sign in to comment.