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
Родитель a44530bd98
Коммит bd20c418a2
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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);