diff options
author | Russ Cox <rsc@swtch.com> | 2009-05-25 00:30:17 -0700 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2009-05-25 00:30:17 -0700 |
commit | 33b446b8bbfea80552d462296d27ad4114fbd3fb (patch) | |
tree | a8f7043166974ce39152147fff99b97140027656 /src/libventi/client.c | |
parent | 9cac97f2c55efc9ffa9b3894127e049cc25852a3 (diff) | |
download | plan9port-33b446b8bbfea80552d462296d27ad4114fbd3fb.tar.gz plan9port-33b446b8bbfea80552d462296d27ad4114fbd3fb.tar.bz2 plan9port-33b446b8bbfea80552d462296d27ad4114fbd3fb.zip |
libventi: protocol support for blocks larger than 64k
Diffstat (limited to 'src/libventi/client.c')
-rw-r--r-- | src/libventi/client.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libventi/client.c b/src/libventi/client.c index 40ee8517..9f200f48 100644 --- a/src/libventi/client.c +++ b/src/libventi/client.c @@ -65,6 +65,10 @@ vtreadpacket(VtConn *z, uchar score[VtScoreSize], uint type, int n) if(memcmp(score, vtzeroscore, VtScoreSize) == 0) return packetalloc(); + if(z->version[1] == '2' && n >= (1<<16)) { + werrstr("read count too large for protocol"); + return nil; + } memset(&tx, 0, sizeof tx); tx.msgtype = VtTread; tx.blocktype = type; |