ENGINE-432: null from now behaves in build fields and decrypt message; need to check with encrypted messages
1.1 --- a/src/mime.c Tue Aug 28 13:18:56 2018 +0200
1.2 +++ b/src/mime.c Tue Aug 28 16:51:36 2018 +0200
1.3 @@ -446,8 +446,6 @@
1.4 char *subject = msg->shortmsg ? msg->shortmsg : altstr;
1.5
1.6 assert(msg);
1.7 - assert(msg->from);
1.8 - assert(msg->from->address);
1.9 assert(result);
1.10
1.11 *result = NULL;
1.12 @@ -485,7 +483,7 @@
1.13 dt = NULL;
1.14 }
1.15
1.16 - /* if (msg->from) */ {
1.17 + if (msg->from) {
1.18 struct mailimf_mailbox_list *from = identity_to_mbl(msg->from);
1.19 if (from == NULL)
1.20 goto enomem;
2.1 --- a/test/src/SuiteMaker.cc Tue Aug 28 13:18:56 2018 +0200
2.2 +++ b/test/src/SuiteMaker.cc Tue Aug 28 16:51:36 2018 +0200
2.3 @@ -44,6 +44,7 @@
2.4 #include "TrustwordsTests.h"
2.5 #include "TrustManipulationTests.h"
2.6 #include "MessageTwoPointOhTests.h"
2.7 +#include "MessageNullFromTests.h"
2.8 #include "EncryptAttachPrivateKeyTests.h"
2.9 #include "DecryptAttachPrivateKeyTrustedTests.h"
2.10 #include "IdentityListTests.h"
2.11 @@ -83,6 +84,7 @@
2.12 "TrustwordsTests",
2.13 "TrustManipulationTests",
2.14 "MessageTwoPointOhTests",
2.15 + "MessageNullFromTests",
2.16 "EncryptAttachPrivateKeyTests",
2.17 "DecryptAttachPrivateKeyTrustedTests",
2.18 "IdentityListTests",
2.19 @@ -90,7 +92,7 @@
2.20 };
2.21
2.22 // This file is generated, so magic constants are ok.
2.23 -int SuiteMaker::num_suites = 36;
2.24 +int SuiteMaker::num_suites = 37;
2.25
2.26 void SuiteMaker::suitemaker_build(const char* test_class_name, const char* test_home, Test::Suite** test_suite) {
2.27 if (strcmp(test_class_name, "MapAsn1Tests") == 0)
2.28 @@ -157,6 +159,8 @@
2.29 *test_suite = new TrustManipulationTests(test_class_name, test_home);
2.30 else if (strcmp(test_class_name, "MessageTwoPointOhTests") == 0)
2.31 *test_suite = new MessageTwoPointOhTests(test_class_name, test_home);
2.32 + else if (strcmp(test_class_name, "MessageNullFromTests") == 0)
2.33 + *test_suite = new MessageNullFromTests(test_class_name, test_home);
2.34 else if (strcmp(test_class_name, "EncryptAttachPrivateKeyTests") == 0)
2.35 *test_suite = new EncryptAttachPrivateKeyTests(test_class_name, test_home);
2.36 else if (strcmp(test_class_name, "DecryptAttachPrivateKeyTrustedTests") == 0)