summaryrefslogtreecommitdiff
path: root/sys/src/cmd/cwfs/9p2.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@gmx.de>2013-01-30 06:28:42 +0100
committercinap_lenrek <cinap_lenrek@gmx.de>2013-01-30 06:28:42 +0100
commit3787f721c1efe19c0502dc7e429459804100757d (patch)
tree2f13a3f87496668b131eff4025d62b8dfdf4ac2e /sys/src/cmd/cwfs/9p2.c
parentdbbbff89151794c838319e831254bcff6b3dbbcf (diff)
9p message size too small
various fileservers do not check if the message size is too small (they subtract IOHDRSZ later from it to calculate iounit) which can overflow.
Diffstat (limited to 'sys/src/cmd/cwfs/9p2.c')
-rw-r--r--sys/src/cmd/cwfs/9p2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/cmd/cwfs/9p2.c b/sys/src/cmd/cwfs/9p2.c
index 8c34691f5..97fafe55f 100644
--- a/sys/src/cmd/cwfs/9p2.c
+++ b/sys/src/cmd/cwfs/9p2.c
@@ -113,7 +113,7 @@ mkdir9p2(Dir* dir, Dentry* dentry, void* strs)
static int
version(Chan* chan, Fcall* f, Fcall* r)
{
- if(chan->protocol != nil)
+ if(chan->protocol != nil || f->msize < 256)
return Eversion;
if(f->msize < MSIZE)