smtpp: a login name of a port alone names no destination

This commit is contained in:
Vladimir Dubrovin committed 2026-11-18 20:10:10 +03:00
1 parent f4dca5d462
commit 6b9f6cb1e1
2 files changed
+94

No files matched your search

+3
View File
@@ -561,6 +561,9 @@ int parsehostname(char *hostname, struct clientparam *param, uint16_t port){
port = atoi(sp+1);
*sp = ':';
}
/* A port alone overrides the port of a host already set; without
one it names no destination to connect to. */
if(!*param->hostname) return 1;
*SAPORT(&param->req) = htons(port);
return 0;
}