mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 09:58:01 +00:00
Increase length limit on SSH1_MSG_DEBUG; 70 chars is short enough to
lose vital information in some existing servers' messages. [originally from svn r1932]
This commit is contained in:
parent
6813094751
commit
b15be34edf
8
ssh.c
8
ssh.c
@ -804,11 +804,11 @@ static int ssh1_rdpkt(unsigned char **data, int *datalen)
|
|||||||
|
|
||||||
if (pktin.type == SSH1_MSG_DEBUG) {
|
if (pktin.type == SSH1_MSG_DEBUG) {
|
||||||
/* log debug message */
|
/* log debug message */
|
||||||
char buf[80];
|
char buf[512];
|
||||||
int stringlen = GET_32BIT(pktin.body);
|
int stringlen = GET_32BIT(pktin.body);
|
||||||
strcpy(buf, "Remote: ");
|
strcpy(buf, "Remote debug message: ");
|
||||||
if (stringlen > 70)
|
if (stringlen > 480)
|
||||||
stringlen = 70;
|
stringlen = 480;
|
||||||
memcpy(buf + 8, pktin.body + 4, stringlen);
|
memcpy(buf + 8, pktin.body + 4, stringlen);
|
||||||
buf[8 + stringlen] = '\0';
|
buf[8 + stringlen] = '\0';
|
||||||
logevent(buf);
|
logevent(buf);
|
||||||
|
Loading…
Reference in New Issue
Block a user