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

This commit is contained in:
Vladimir Dubrovin committed 2026-11-18 20:50:28 +03:00
1 parent d82b780dda
commit f105a27e68
2 files changed
+7

No files matched your search

+3
View File
@@ -587,6 +587,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 || !*param->hostname) return 1;
*SAPORT(&param->req) = htons(port);
return 0;
}