Commit ab06d514 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩
Browse files

Do not crash in lime if either message or content type is NULL

parent d67eeda8
......@@ -485,6 +485,9 @@ int lime_createMultipartMessage(void *cachedb, const char *contentType, uint8_t
if (bzrtp_getSelfZID(cachedb, selfURI, selfZid, NULL) != 0) {
return LIME_UNABLE_TO_ENCRYPT_MESSAGE;
}
if (message == NULL || contentType == NULL) {
return LIME_UNABLE_TO_ENCRYPT_MESSAGE;
}
/* encrypted message length is plaintext + 16 for tag */
encryptedMessageLength = (uint32_t)strlen((char *)message) + 16;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment