mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-01 03:22:48 -05:00
ampersat-in-username': tweak
strchr' to `strrchr' where necessary to
consistently support usernames containing `@'. [originally from svn r4563]
This commit is contained in:
@ -471,7 +471,7 @@ int main(int argc, char **argv)
|
||||
|
||||
/* See if host is of the form user@host */
|
||||
if (cfg.host[0] != '\0') {
|
||||
char *atsign = strchr(cfg.host, '@');
|
||||
char *atsign = strrchr(cfg.host, '@');
|
||||
/* Make sure we're not overflowing the user field */
|
||||
if (atsign) {
|
||||
if (atsign - cfg.host < sizeof cfg.username) {
|
||||
|
Reference in New Issue
Block a user