aboutsummaryrefslogtreecommitdiff
path: root/src/libplumb
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2004-04-24 04:52:49 +0000
committerrsc <devnull@localhost>2004-04-24 04:52:49 +0000
commit78802e6993a0f44d7ac7ff7d0922d55d1b089dac (patch)
tree2131829fda5ff9ee9f8ef8c88695c361cc4ba335 /src/libplumb
parent272fd660b41d7ec793bc9d8972878510f3b66055 (diff)
downloadplan9port-78802e6993a0f44d7ac7ff7d0922d55d1b089dac.tar.gz
plan9port-78802e6993a0f44d7ac7ff7d0922d55d1b089dac.tar.bz2
plan9port-78802e6993a0f44d7ac7ff7d0922d55d1b089dac.zip
various bug fixes
Diffstat (limited to 'src/libplumb')
-rwxr-xr-xsrc/libplumb/mesg.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libplumb/mesg.c b/src/libplumb/mesg.c
index 4b278695..670059ca 100755
--- a/src/libplumb/mesg.c
+++ b/src/libplumb/mesg.c
@@ -64,6 +64,10 @@ plumbsendtofid(Fid *fid, Plumbmsg *m)
char *buf;
int n;
+ if(fid == nil){
+ werrstr("invalid fid");
+ return -1;
+ }
buf = plumbpack(m, &n);
if(buf == nil)
return -1;
@@ -75,6 +79,10 @@ plumbsendtofid(Fid *fid, Plumbmsg *m)
int
plumbsend(int fd, Plumbmsg *m)
{
+ if(fd == -1){
+ werrstr("invalid fd");
+ return -1;
+ }
if(fd != pfd){
werrstr("fd is not the plumber");
return -1;