shithub: plan9front

Download patch

ref: 8f1954c0dd4ca231d6904fbbd788dbe40ef284e3
parent: 62a4e64d31cc681e891967656dc8fa22cba1eb87
author: Ori Bernstein <ori@eigenstate.org>
date: Wed Jul 13 17:01:11 EDT 2022

upas/Mail: check if plumb attrs are nil

--- a/sys/src/cmd/upas/Mail/mbox.c	Tue Jul 12 12:38:41 2022
+++ b/sys/src/cmd/upas/Mail/mbox.c	Wed Jul 13 17:01:11 2022
@@ -802,6 +802,8 @@
 
 	digest = plumblookup(pm->attr, "digest");
 	action = plumblookup(pm->attr, "mailtype");
+	if(digest == nil || action == nil)
+		return;
 	if(strcmp(action, "new") == 0){
 		if((m = load(pm->data, digest, 1)) == nil)
 			return;