aboutsummaryrefslogtreecommitdiff
path: root/src/libventi
diff options
context:
space:
mode:
authorRuss Cox <rsc@swtch.com>2009-07-26 13:40:01 -0400
committerRuss Cox <rsc@swtch.com>2009-07-26 13:40:01 -0400
commit6f4a41c68c39970dab1d0e09393a57b6cc3f55d6 (patch)
tree6a5d64aece81bf6c22c8d67bfb8ceb9be0f7064a /src/libventi
parent44c6e39c25dd6e029379fa0474fe27f4cbab181a (diff)
downloadplan9port-6f4a41c68c39970dab1d0e09393a57b6cc3f55d6.tar.gz
plan9port-6f4a41c68c39970dab1d0e09393a57b6cc3f55d6.tar.bz2
plan9port-6f4a41c68c39970dab1d0e09393a57b6cc3f55d6.zip
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
Diffstat (limited to 'src/libventi')
-rw-r--r--src/libventi/fcall.c2
1 files changed, 1 insertions, 1 deletions
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)