mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 01:48:00 +00:00
Apparently Vista's printf-like functions don't support %n by default.
We could explicitly re-enable %n, but we only use it in one place, so take the path of least resistance and remove that single instance. This stops dupvprintf() getting stuck in a loop (a behaviour that's caused by a workaround for a broken libc). <http://msdn.microsoft.com/en-us/library/ms175782(VS.80).aspx> [originally from svn r8030]
This commit is contained in:
parent
44f578e479
commit
33bfb2bc72
10
ssh.c
10
ssh.c
@ -8569,7 +8569,7 @@ static void ssh2_msg_disconnect(Ssh ssh, struct Packet *pktin)
|
||||
{
|
||||
/* log reason code in disconnect message */
|
||||
char *buf, *msg;
|
||||
int nowlen, reason, msglen;
|
||||
int reason, msglen;
|
||||
|
||||
reason = ssh_pkt_getuint32(pktin);
|
||||
ssh_pkt_getstring(pktin, &msg, &msglen);
|
||||
@ -8583,14 +8583,14 @@ static void ssh2_msg_disconnect(Ssh ssh, struct Packet *pktin)
|
||||
}
|
||||
logevent(buf);
|
||||
sfree(buf);
|
||||
buf = dupprintf("Disconnection message text: %n%.*s",
|
||||
&nowlen, msglen, msg);
|
||||
buf = dupprintf("Disconnection message text: %.*s",
|
||||
msglen, msg);
|
||||
logevent(buf);
|
||||
bombout(("Server sent disconnect message\ntype %d (%s):\n\"%s\"",
|
||||
bombout(("Server sent disconnect message\ntype %d (%s):\n\"%.*s\"",
|
||||
reason,
|
||||
(reason > 0 && reason < lenof(ssh2_disconnect_reasons)) ?
|
||||
ssh2_disconnect_reasons[reason] : "unknown",
|
||||
buf+nowlen));
|
||||
msglen, msg));
|
||||
sfree(buf);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user