Bug 1611105 - If MimeMultipartSigned_emit_child fails, mark MIME part as done. r+a=mkmelin
authorKai Engert <kaie@kuix.de>
Thu, 23 Jan 2020 22:04:26 +0100
changeset 37016 39542aae79eca484cab6f77058105ea47006d5ea
parent 37015 4e22dfa52e46c007709383929a64b311b4df885a
child 37017 503f096dbbd257c90242ecb6cad529b3b5c321b4
push id2548
push userthunderbird@calypsoblue.org
push dateThu, 30 Jan 2020 20:54:16 +0000
treeherdercomm-beta@f6219b04be6d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1611105
Bug 1611105 - If MimeMultipartSigned_emit_child fails, mark MIME part as done. r+a=mkmelin
mailnews/mime/src/mimemsig.cpp
--- a/mailnews/mime/src/mimemsig.cpp
+++ b/mailnews/mime/src/mimemsig.cpp
@@ -114,17 +114,20 @@ static int MimeMultipartSigned_parse_eof
   }
 
   if (!abort_p) {
     /* Now that we've read both the signed object and the signature (and
      have presumably verified the signature) write out a blurb, and then
      the signed object.
      */
     status = MimeMultipartSigned_emit_child(obj);
-    if (status < 0) return status;
+    if (status < 0) {
+      obj->closed_p = true;
+      return status;
+    }
   }
 
   MimeMultipartSigned_cleanup(obj, false);
   return ((MimeObjectClass *)&MIME_SUPERCLASS)->parse_eof(obj, abort_p);
 }
 
 static void MimeMultipartSigned_finalize(MimeObject *obj) {
   MimeMultipartSigned_cleanup(obj, true);