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

This commit is contained in:
Vladimir Dubrovin committed 2026-11-18 20:20:22 +03:00
1 parent 51559e12c4
commit 83269785df
2 files changed
+94

No files matched your search

+3
View File
@@ -563,6 +563,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;
}