]> diplodocus.org Git - nmh/commitdiff
Don't set CT type if reformat failed.
authorDavid Levine <levinedl@acm.org>
Mon, 31 Oct 2016 19:03:07 +0000 (15:03 -0400)
committerDavid Levine <levinedl@acm.org>
Mon, 31 Oct 2016 19:19:32 +0000 (15:19 -0400)
test/mhfixmsg/test-mhfixmsg
uip/mhfixmsg.c

index b3177db..a95ef3f 100755 (executable)
@@ -1072,6 +1072,7 @@ fi
 
 
 # check handling of rfc822 message type
+# also, checks -fixboundary
 start_test "handling of rfc822 message type"
 cat >"$expected" <<EOF
 From: Test <test@example.com>
@@ -1109,7 +1110,7 @@ Date: Fri, 29 Sep 2006 00:00:00
 Message-Id: @test.nmh
 Subject: message with message/rfc822 attachment
 MIME-Version: 1.0
-Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaa0"
+Content-Type: multipart/mixed; boundary="----- =badboundary"
 
 and some garbage before the attachment
 
index e958459..388a1c6 100644 (file)
@@ -1629,7 +1629,8 @@ reformat_part (CT ct, char *file, char *type, char *subtype, int c_type) {
     }
 
     output_encoding = content_encoding (ct, &reason);
-    if (set_ct_type (ct, c_type, output_subtype, output_encoding) == OK) {
+    if (status == OK  &&
+        set_ct_type (ct, c_type, output_subtype, output_encoding) == OK) {
         ct->c_cefile.ce_file = file;
         ct->c_cefile.ce_unlink = 1;
     } else {