1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

Fix a bounds check that should have been >= not >.

Thanks to René König for pointing it out.

[originally from svn r10174]
This commit is contained in:
Simon Tatham 2014-04-18 14:37:27 +00:00
parent a44530bd98
commit bd20c418a2

View File

@ -1763,7 +1763,7 @@ static int share_receive(Plug plug, int urgent, char *data, int len)
crGetChar(c);
if (c == '\012')
break;
if (cs->recvlen > sizeof(cs->recvbuf)) {
if (cs->recvlen >= sizeof(cs->recvbuf)) {
char *buf = dupprintf("Version string far too long\n");
share_disconnect(cs, buf);
sfree(buf);