aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--build-android/README.md2
-rw-r--r--src/core/basetypes/MCString.cpp1
-rw-r--r--src/objc/imap/MCOIMAPCheckAccountOperation.mm3
3 files changed, 4 insertions, 2 deletions
diff --git a/build-android/README.md b/build-android/README.md
index 25932637..e34e44ee 100644
--- a/build-android/README.md
+++ b/build-android/README.md
@@ -17,7 +17,7 @@ It will produce the following binaries:
### Running example ###
-Copy the binary result of the build (ailcore2-android-*version*.aar) to `mailcore2/example/android/AndroidExample/app/libs`.
+Copy the binary result of the build (mailcore2-android-*version*.aar) to `mailcore2/example/android/AndroidExample/app/libs`.
- Open the example in Android Studio
- Tweaks the login and password in the class `MessagesSyncManager`
diff --git a/src/core/basetypes/MCString.cpp b/src/core/basetypes/MCString.cpp
index 46aebd44..65c8f7a3 100644
--- a/src/core/basetypes/MCString.cpp
+++ b/src/core/basetypes/MCString.cpp
@@ -2392,6 +2392,7 @@ Array * String::componentsSeparatedByString(String * separator)
p = location + separator->length();
}
unsigned int length = (unsigned int) (mLength - (p - mUnicodeChars));
+ MCAssert(length <= mLength);
String * value = new String(p, length);
result->addObject(value);
value->release();
diff --git a/src/objc/imap/MCOIMAPCheckAccountOperation.mm b/src/objc/imap/MCOIMAPCheckAccountOperation.mm
index f1aa59b4..42472431 100644
--- a/src/objc/imap/MCOIMAPCheckAccountOperation.mm
+++ b/src/objc/imap/MCOIMAPCheckAccountOperation.mm
@@ -62,7 +62,8 @@ typedef void (^CompletionType)(NSError *error);
} else {
NSError * error = [NSError mco_errorWithErrorCode:op->error()];
if (op->loginResponse() != NULL) {
- NSDictionary * userInfo = @{@"IMAPServerError": MCO_TO_OBJC(op->loginResponse())};
+ NSMutableDictionary * userInfo = [[error userInfo] mutableCopy];
+ userInfo[@"IMAPServerError"] = MCO_TO_OBJC(op->loginResponse());
error = [NSError errorWithDomain:[error domain] code:[error code] userInfo:userInfo];
}
_completionBlock(error);