diff options
author | Hoa V. DINH <dinh.viet.hoa@gmail.com> | 2013-08-30 20:17:02 -0700 |
---|---|---|
committer | Hoa V. DINH <dinh.viet.hoa@gmail.com> | 2013-08-30 20:17:02 -0700 |
commit | 4d26945576b34192b10148df7f1d5879d0448f18 (patch) | |
tree | 9ed50a421156a23d467c6892406d0a91e0456ca9 /src/core/smtp | |
parent | a50dcb62b2101695deb7cdfd10b4f0f3e595d62f (diff) |
Fixed crash when message does not contain sender or recipient
Diffstat (limited to 'src/core/smtp')
-rw-r--r-- | src/core/smtp/MCSMTPSession.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/smtp/MCSMTPSession.cc b/src/core/smtp/MCSMTPSession.cc index 78eb4113..4b31fd6d 100644 --- a/src/core/smtp/MCSMTPSession.cc +++ b/src/core/smtp/MCSMTPSession.cc @@ -579,6 +579,15 @@ void SMTPSession::sendMessage(Address * from, Array * recipients, Data * message clist * address_list; int r; + if (from == NULL) { + * pError = ErrorNoSender; + return; + } + if ((recipients == NULL) || (recipients->count() == 0)) { + * pError = ErrorNoRecipient; + return; + } + messageData = dataWithFilteredBcc(messageData); mProgressCallback = callback; |