]> granicus.if.org Git - neomutt/commitdiff
libemail: fix body code for degenerate cases
authorRichard Russon <rich@flatcap.org>
Mon, 29 Apr 2019 13:57:29 +0000 (14:57 +0100)
committerRichard Russon <rich@flatcap.org>
Tue, 30 Apr 2019 10:22:04 +0000 (11:22 +0100)
email/body.c

index ff659dde4b135a146d041c548daf812df47cb26c..cb0f821c987d20b944f7da5770d39c9eabb0370f 100644 (file)
@@ -107,6 +107,9 @@ void mutt_body_free(struct Body **p)
  */
 bool mutt_body_cmp_strict(const struct Body *b1, const struct Body *b2)
 {
+  if (!b1 || !b2)
+    return false;
+
   if ((b1->type != b2->type) || (b1->encoding != b2->encoding) ||
       (mutt_str_strcmp(b1->subtype, b2->subtype) != 0) ||
       (mutt_str_strcmp(b1->description, b2->description) != 0) ||