commit 6f4a41c68c39970dab1d0e09393a57b6cc3f55d6 from: Russ Cox date: Sun Jul 26 17:40:01 2009 UTC libventi: correct handling of VtRead size 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 commit - 44c6e39c25dd6e029379fa0474fe27f4cbab181a commit + 6f4a41c68c39970dab1d0e09393a57b6cc3f55d6 blob - f2a03753de4d0b3f38db091192e931b62a242295 blob + 611246f74f9c9dd99016bd432eb24fb3ef5f9590 --- src/libventi/fcall.c +++ 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)