Commit Diff


commit - 0cadb4301d18724e7513d7489cb5bebd262c82f1
commit + 7b5db1c35abac2240fffbee2027c3e99b760863c
blob - 14ace3230e56e19937c9d72f7aacb6a457e70e87
blob + 474d8497285776ea3f248e2a8f6e8e67b899ad43
--- src/cmd/acme/mail/mail.c
+++ src/cmd/acme/mail/mail.c
@@ -84,9 +84,12 @@ threadmain(int argc, char *argv[])
 	quotefmtinstall();
 
 	/* open these early so we won't miss notification of new mail messages while we read mbox */
-	plumbsendfd = plumbopenfid("send", OWRITE|OCEXEC);
-	plumbseemailfd = plumbopenfid("seemail", OREAD|OCEXEC);
-	plumbshowmailfd = plumbopenfid("showmail", OREAD|OCEXEC);
+	if((plumbsendfd = plumbopenfid("send", OWRITE|OCEXEC)) == nil)
+		fprint(2, "warning: open plumb/send: %r\n");
+	if((plumbseemailfd = plumbopenfid("seemail", OREAD|OCEXEC)) == nil)
+		fprint(2, "warning: open plumb/seemail: %r\n");
+	if((plumbshowmailfd = plumbopenfid("showmail", OREAD|OCEXEC)) == nil)
+		fprint(2, "warning: open plumb/showmail: %r\n");
 
 	shortmenu = 0;
 	srvname = "mail";
blob - ec133c821835f90e750720a6baa0dad825defd71
blob + 017f92c3ee290660da1e3683aaaa7c4f6cb47618
--- src/libplumb/fid.c
+++ 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;