From 6f4a41c68c39970dab1d0e09393a57b6cc3f55d6 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Sun, 26 Jul 2009 13:40:01 -0400 Subject: libventi: correct handling of VtRead size MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #7 http://code.swtch.com/plan9port/issue/7/ Thanks to Venkatesh Srinivas and Michael Teichgräber for finding the bug. http://codereview.appspot.com/98041 --- src/libventi/fcall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/libventi/fcall.c b/src/libventi/fcall.c index f2a03753..611246f7 100644 --- a/src/libventi/fcall.c +++ b/src/libventi/fcall.c @@ -182,7 +182,7 @@ vtfcallunpack(VtFcall *f, Packet *p) case 2: if(packetconsume(p, buf, 2) < 0) goto Err; - f->count = (buf[2] << 8) | buf[3]; + f->count = (buf[0] << 8) | buf[1]; break; case 4: if(packetconsume(p, buf, 4) < 0) -- cgit v1.2.3