diff options
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; |