aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2014-01-19 15:45:28 +0000
committerVincent Richard <[email protected]>2014-01-19 15:45:28 +0000
commit74e8e4792651ea74fcdb6786e58deea563e2fb0f (patch)
treea69e7c96dda03c92c523767bb9df1b8e2482a227
parentFixed argument to handshake(). (diff)
downloadvmime-74e8e4792651ea74fcdb6786e58deea563e2fb0f.tar.gz
vmime-74e8e4792651ea74fcdb6786e58deea563e2fb0f.zip
Fixed possible crash when COPYUID/APPENDUID is not supported by the server.
-rw-r--r--src/vmime/net/imap/IMAPFolder.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vmime/net/imap/IMAPFolder.cpp b/src/vmime/net/imap/IMAPFolder.cpp
index 343ec35e..3af9225a 100644
--- a/src/vmime/net/imap/IMAPFolder.cpp
+++ b/src/vmime/net/imap/IMAPFolder.cpp
@@ -1124,7 +1124,7 @@ messageSet IMAPFolder::addMessage
const IMAPParser::resp_text_code* respTextCode =
finalResp->response_done()->response_tagged()->resp_cond_state()->resp_text()->resp_text_code();
- if (respTextCode->type() == IMAPParser::resp_text_code::APPENDUID)
+ if (respTextCode && respTextCode->type() == IMAPParser::resp_text_code::APPENDUID)
return IMAPUtils::buildMessageSet(respTextCode->uid_set());
return messageSet::empty();
@@ -1266,7 +1266,7 @@ messageSet IMAPFolder::copyMessages(const folder::path& dest, const messageSet&
const IMAPParser::resp_text_code* respTextCode =
resp->response_done()->response_tagged()->resp_cond_state()->resp_text()->resp_text_code();
- if (respTextCode->type() == IMAPParser::resp_text_code::COPYUID)
+ if (respTextCode && respTextCode->type() == IMAPParser::resp_text_code::COPYUID)
return IMAPUtils::buildMessageSet(respTextCode->uid_set2());
return messageSet::empty();