aboutsummaryrefslogtreecommitdiff
path: root/src/libplumb
diff options
context:
space:
mode:
authorMathieu Lonjaret <lejatorn@gmail.com>2009-09-12 15:25:51 -0400
committerMathieu Lonjaret <lejatorn@gmail.com>2009-09-12 15:25:51 -0400
commit7b5db1c35abac2240fffbee2027c3e99b760863c (patch)
tree886260ba0d779ffad2b6efc34ee05578dc396902 /src/libplumb
parent0cadb4301d18724e7513d7489cb5bebd262c82f1 (diff)
downloadplan9port-7b5db1c35abac2240fffbee2027c3e99b760863c.tar.gz
plan9port-7b5db1c35abac2240fffbee2027c3e99b760863c.tar.bz2
plan9port-7b5db1c35abac2240fffbee2027c3e99b760863c.zip
libplumb, Mail: fix crash on nil plumb fids
http://codereview.appspot.com/116083
Diffstat (limited to 'src/libplumb')
-rw-r--r--src/libplumb/fid.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libplumb/fid.c b/src/libplumb/fid.c
index ec133c82..017f92c3 100644
--- a/src/libplumb/fid.c
+++ b/src/libplumb/fid.c
@@ -138,6 +138,10 @@ plumbrecvfid(CFid *fid)
Plumbmsg *m;
int n, more;
+ if(fid == nil){
+ werrstr("invalid fid");
+ return nil;
+ }
buf = malloc(8192);
if(buf == nil)
return nil;