mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-08 08:58:00 +00:00
sessprep: fix detection of unbracketed IPv6 literals.
The centralisation I did in commit e3796cb77
introduced a foolish
sense error, in which I was supposed to be treating an unbracketed
colon in CONF_hostname as separating host name from a port-number-
shaped suffix if it _was_ the only one, and instead, accidentally did
so if it _wasn't_.
This commit is contained in:
parent
f433c82cc2
commit
fdf7de4a1c
@ -63,7 +63,7 @@ void prepare_session(Conf *conf)
|
||||
* _more_ than one (un-IPv6-bracketed) colon.
|
||||
*/
|
||||
p = host_strchr(host, ':');
|
||||
if (p && p != host_strrchr(host, ':')) {
|
||||
if (p && p == host_strrchr(host, ':')) {
|
||||
*p = '\0';
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user