]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Fix a bounds check that should have been >= not >.
authorSimon Tatham <anakin@pobox.com>
Fri, 18 Apr 2014 14:37:27 +0000 (14:37 +0000)
committerSimon Tatham <anakin@pobox.com>
Fri, 18 Apr 2014 14:37:27 +0000 (14:37 +0000)
Thanks to René König for pointing it out.

[originally from svn r10174]

sshshare.c

index bd4602b5bb26400e56554facaea43b4558821cf7..bf2a64c2925e382f2a91cdfd7cba008bf6b6be85 100644 (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);