]> granicus.if.org Git - neomutt/commitdiff
The attached patch fixes a segfault I observed today: mutt failed to
authorChristoph Ludwig <cludwig@cdc.informatik.tu-darmstadt.de>
Sat, 5 Mar 2005 18:15:20 +0000 (18:15 +0000)
committerChristoph Ludwig <cludwig@cdc.informatik.tu-darmstadt.de>
Sat, 5 Mar 2005 18:15:20 +0000 (18:15 +0000)
check for a possible null pointer in
mutt_is_application_smime(Body*).

crypt.c

diff --git a/crypt.c b/crypt.c
index ae79b147335ad2dc7ae26d6c3775445e32c2beba..62fa3f40b17f8aaecfd3c29291997c79cb280d94 100644 (file)
--- a/crypt.c
+++ b/crypt.c
@@ -360,6 +360,9 @@ int mutt_is_application_smime (BODY *m)
   char *t=NULL;
   int len, complain=0;
 
+  if(!m)
+    return 0;
+
   if ((m->type & TYPEAPPLICATION) && m->subtype)
   {
     /* S/MIME MIME types don't need x- anymore, see RFC2311 */