1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 01:48: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); crGetChar(c);
if (c == '\012') if (c == '\012')
break; break;
if (cs->recvlen > sizeof(cs->recvbuf)) { if (cs->recvlen >= sizeof(cs->recvbuf)) {
char *buf = dupprintf("Version string far too long\n"); char *buf = dupprintf("Version string far too long\n");
share_disconnect(cs, buf); share_disconnect(cs, buf);
sfree(buf); sfree(buf);