diff options
author | Mathieu Lonjaret <lejatorn@gmail.com> | 2009-09-12 15:25:51 -0400 |
---|---|---|
committer | Mathieu Lonjaret <lejatorn@gmail.com> | 2009-09-12 15:25:51 -0400 |
commit | 7b5db1c35abac2240fffbee2027c3e99b760863c (patch) | |
tree | 886260ba0d779ffad2b6efc34ee05578dc396902 /src/libplumb | |
parent | 0cadb4301d18724e7513d7489cb5bebd262c82f1 (diff) | |
download | plan9port-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.c | 4 |
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; |