diff options
author | Keith Packard <keithp@keithp.com> | 2001-12-05 18:12:21 +0000 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@sun.com> | 2009-05-04 18:13:31 -0700 |
commit | 093842a5e11bb5c0fd17b51a6c037634b5a3a223 (patch) | |
tree | 3e274c5439a6843a62d76b557d497f472a81f88d /server.c | |
parent | 30392c1e635663e5b3eb5771d8ce4c852cada4b8 (diff) | |
download | xscope-093842a5e11bb5c0fd17b51a6c037634b5a3a223.tar.gz |
Avoid infinite loop on broken protocol
Diffstat (limited to 'server.c')
-rw-r--r-- | server.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -500,6 +500,8 @@ long StartRequest (fd, buf, n) /* bytes 0,1 are ignored now; bytes 2,3 tell us the request length */ requestlength = IShort(&buf[2]); + if (requestlength == 0) + requestlength=0xffff; CS[fd].ByteProcessing = FinishRequest; CS[fd].NumberofBytesNeeded = 4 * requestlength; debug(8,(stderr, "need %d more bytes to finish request\n", |